diff --git a/test-case/check-pause-resume.sh b/test-case/check-pause-resume.sh index 6819cf04..17c49ffc 100755 --- a/test-case/check-pause-resume.sh +++ b/test-case/check-pause-resume.sh @@ -93,40 +93,19 @@ do dev=$(func_pipeline_parse_value "$idx" dev) snd=$(func_pipeline_parse_value "$idx" snd) - # expect is tcl language script - # expr rand(): produces random numbers between 0 and 1 - # after ms: Ms must be an integer giving a time in milliseconds. - # The command sleeps for ms milliseconds and then returns. - dlogi "Entering expect script with: - $cmd $SOF_ALSA_OPTS $cmd_opts -D $dev -r $rate -c $channel -f $fmt -vv -i $file_name -q" - - expect < $repeat_count } { exit 0 } - exp_continue - } -} -exit 1 -END - ret=$? + ret=0 + (set -x + # The 4 expect arguments first, then $cmd + $cmd arguments + # shellcheck disable=SC2086 + "$TOPDIR"/case-lib/apause.exp "$cmd" "$repeat_count" "$rnd_min" "$rnd_range" \ + "$cmd" $SOF_ALSA_OPTS $cmd_opts -D "$dev" -r "$rate" -c "$channel" -f "$fmt" \ + -vv -i "$file_name" + ) || ret=$? + #flush the output echo if [ $ret -ne 0 ]; then + echo "apause.exp returned: $ret" func_lib_lsof_error_dump "$snd" sof-process-kill.sh || dlogw "Kill process catch error"