From d5168f7d5d0c7d862f011d30a1e83b0396422421 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Tue, 9 Jul 2024 14:37:24 -0700 Subject: [PATCH] switch single pause-resume to new apause.exp Signed-off-by: Marc Herbert --- test-case/check-pause-resume.sh | 41 ++++++++------------------------- 1 file changed, 10 insertions(+), 31 deletions(-) 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"