File tree Expand file tree Collapse file tree 1 file changed +10
-31
lines changed
Expand file tree Collapse file tree 1 file changed +10
-31
lines changed Original file line number Diff line number Diff line change 9393 dev=$( func_pipeline_parse_value " $idx " dev)
9494 snd=$( func_pipeline_parse_value " $idx " snd)
9595
96- # expect is tcl language script
97- # expr rand(): produces random numbers between 0 and 1
98- # after ms: Ms must be an integer giving a time in milliseconds.
99- # The command sleeps for ms milliseconds and then returns.
100- dlogi " Entering expect script with:
101- $cmd $SOF_ALSA_OPTS $cmd_opts -D $dev -r $rate -c $channel -f $fmt -vv -i $file_name -q"
102-
103- expect << END
104- spawn $cmd $SOF_ALSA_OPTS $cmd_opts -D $dev -r $rate -c $channel -f $fmt -vv -i $file_name -q
105- set i 1
106- expect {
107- "*#*+*\%" {
108- set sleep_t [expr int([expr rand() * $rnd_range ]) + $rnd_min ]
109- puts "\r(\$ i/$repeat_count ) Wait for \$ sleep_t ms before pause"
110- send " "
111- after \$ sleep_t
112- exp_continue
113- }
114- "*PAUSE*" {
115- set sleep_t [expr int([expr rand() * $rnd_range ]) + $rnd_min ]
116- puts "\r(\$ i/$repeat_count ) Wait for \$ sleep_t ms before resume"
117- send " "
118- after \$ sleep_t
119- incr i
120- if { \$ i > $repeat_count } { exit 0 }
121- exp_continue
122- }
123- }
124- exit 1
125- END
126- ret=$?
96+ ret=0
97+ (set -x
98+ # The 4 expect arguments first, then $cmd + $cmd arguments
99+ # shellcheck disable=SC2086
100+ " $TOPDIR " /case-lib/apause.exp " $cmd " " $repeat_count " " $rnd_min " " $rnd_range " \
101+ " $cmd " $SOF_ALSA_OPTS $cmd_opts -D " $dev " -r " $rate " -c " $channel " -f " $fmt " \
102+ -vv -i " $file_name "
103+ ) || ret=$?
104+
127105 # flush the output
128106 echo
129107 if [ $ret -ne 0 ]; then
108+ echo " apause.exp returned: $ret "
130109 func_lib_lsof_error_dump " $snd "
131110 sof-process-kill.sh ||
132111 dlogw " Kill process catch error"
You can’t perform that action at this time.
0 commit comments