Skip to content

Commit a95893b

Browse files
pkunieckmajunkier
authored andcommitted
test-case: check-capture: execute only on nocodec
Add skip_test method to test ultrasound only on nocodec topology, to prevent fails on CI Signed-off-by: Patryk Kuniecki <patryk.kuniecki@intel.com>
1 parent ac60407 commit a95893b

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

case-lib/lib.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,9 +1471,11 @@ update_topology_filename() {
14711471

14721472
# Restore the original topology after the test
14731473
restore_topology() {
1474-
echo "$old_topology" | sudo tee "$modprobe_file" > /dev/null
1475-
echo "Restored original topology: $old_topology"
1476-
sudo "$remove_script"
1477-
sudo "$insert_script"
1474+
if [[ -f "$old_topology" ]]; then
1475+
echo "$old_topology" | sudo tee "$modprobe_file" > /dev/null
1476+
echo "Restored original topology: $old_topology"
1477+
sudo "$remove_script"
1478+
sudo "$insert_script"
1479+
fi
14781480
check_topology
14791481
}

test-case/check-capture.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,14 @@ file_prefix=${OPT_VAL['f']}
6565
samplerate=${OPT_VAL['R']} # Use the sample rate specified by the -R option
6666
new_tplg_filename=${OPT_VAL['T']} # New topology filename
6767

68-
if [[ -n "$new_tplg_filename" ]]; then
68+
if [[ -n "$new_tplg_filename" && "$TPLG" == *nocodec* ]]; then
6969
update_topology_filename
7070
fi
71+
7172
start_test
73+
if [[ -n "$new_tplg_filename" && "$TPLG" != *nocodec* ]]; then
74+
skip_test "Skipping: this test is supported only on NOCODEC platforms."
75+
fi
7276
logger_disabled || func_lib_start_log_collect
7377

7478
setup_kernel_check_point

0 commit comments

Comments
 (0)