Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions case-lib/lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1471,9 +1471,11 @@ update_topology_filename() {

# Restore the original topology after the test
restore_topology() {
echo "$old_topology" | sudo tee "$modprobe_file" > /dev/null
echo "Restored original topology: $old_topology"
sudo "$remove_script"
sudo "$insert_script"
if [[ -f "$old_topology" ]]; then
echo "$old_topology" | sudo tee "$modprobe_file" > /dev/null
echo "Restored original topology: $old_topology"
sudo "$remove_script"
sudo "$insert_script"
fi
check_topology
}
6 changes: 5 additions & 1 deletion test-case/check-capture.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,14 @@ file_prefix=${OPT_VAL['f']}
samplerate=${OPT_VAL['R']} # Use the sample rate specified by the -R option
new_tplg_filename=${OPT_VAL['T']} # New topology filename

if [[ -n "$new_tplg_filename" ]]; then
if [[ -n "$new_tplg_filename" && "$TPLG" == *nocodec* ]]; then
update_topology_filename
fi

start_test
if [[ -n "$new_tplg_filename" && "$TPLG" != *nocodec* ]]; then
skip_test "Skipping: this test is supported only on NOCODEC platforms."
fi
logger_disabled || func_lib_start_log_collect

setup_kernel_check_point
Expand Down