diff --git a/case-lib/lib.sh b/case-lib/lib.sh index e8d6a90d..ab717356 100644 --- a/case-lib/lib.sh +++ b/case-lib/lib.sh @@ -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 } diff --git a/test-case/check-capture.sh b/test-case/check-capture.sh index f834b5aa..46674bd6 100755 --- a/test-case/check-capture.sh +++ b/test-case/check-capture.sh @@ -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