5454# # completion.
5555
5656CASEDIR=$( dirname " ${BASH_SOURCE[0]} " )
57- source $CASEDIR /../case-lib/lib.sh
57+
58+ # shellcheck source=case-lib/lib.sh
59+ source " $CASEDIR " /../case-lib/lib.sh
5860
5961OPT_NAME[' m' ]=' mode' OPT_DESC[' m' ]=' test mode. Example: playback; capture'
6062OPT_HAS_ARG[' m' ]=1 OPT_VAL[' m' ]=' playback'
@@ -74,7 +76,7 @@ OPT_HAS_ARG['i']=1 OPT_VAL['i']='500'
7476OPT_NAME[' s' ]=' sof-logger' OPT_DESC[' s' ]=" Open sof-logger trace the data will store at $LOG_ROOT "
7577OPT_HAS_ARG[' s' ]=0 OPT_VAL[' s' ]=1
7678
77- OPT_NAME[' t' ]=' tplg' OPT_DESC[' t' ]=' tplg file , default value is env TPLG: $ TPLG'
79+ OPT_NAME[' t' ]=' tplg' OPT_DESC[' t' ]=' tplg path , default is environment variable: TPLG'
7880OPT_HAS_ARG[' t' ]=1 OPT_VAL[' t' ]=" $TPLG "
7981
8082func_opt_parse_option " $@ "
@@ -107,7 +109,7 @@ setup_kernel_check_point
107109
108110func_pipeline_export " $tplg " " type:$test_mode & ${OPT_VAL['S']} "
109111
110- for idx in $( seq 0 $( expr $ PIPELINE_COUNT - 1) )
112+ for idx in $( seq 0 $(( PIPELINE_COUNT - 1 ) ))
111113do
112114 channel=$( func_pipeline_parse_value " $idx " channel)
113115 rate=$( func_pipeline_parse_value " $idx " rate)
@@ -178,8 +180,7 @@ AUDIO
178180 # flush the output
179181 echo
180182 if [ $ret -ne 0 ]; then
181- sof-process-kill.sh
182- [[ $? -ne 0 ]] && dlogw " Kill process catch error"
183+ sof-process-kill.sh || dlogw " Kill process catch error"
183184 exit $ret
184185 fi
185186 sof-kernel-log-check.sh " $KERNEL_CHECKPOINT " || die " Caught error in kernel log"
0 commit comments