Skip to content

Commit

Permalink
pause-release-suspend-resume: fix the shellcheck warnings
Browse files Browse the repository at this point in the history
Signed-off-by: Wanzhuo.Li <[email protected]>
  • Loading branch information
Wanzhuo.Li committed Sep 9, 2021
1 parent 78953be commit 4eb3a0d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test-case/check-pause-release-suspend-resume.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,9 @@ set -e
## completion.

CASEDIR=$(dirname "${BASH_SOURCE[0]}")
source $CASEDIR/../case-lib/lib.sh

# shellcheck source=case-lib/lib.sh
source "$CASEDIR"/../case-lib/lib.sh

OPT_NAME['m']='mode' OPT_DESC['m']='test mode. Example: playback; capture'
OPT_HAS_ARG['m']=1 OPT_VAL['m']='playback'
Expand All @@ -73,7 +75,7 @@ OPT_HAS_ARG['i']=1 OPT_VAL['i']='200'
OPT_NAME['s']='sof-logger' OPT_DESC['s']="Open sof-logger trace the data will store at $LOG_ROOT"
OPT_HAS_ARG['s']=0 OPT_VAL['s']=1

OPT_NAME['t']='tplg' OPT_DESC['t']='tplg file, default value is env TPLG: $TPLG'
OPT_NAME['t']='tplg' OPT_DESC['t']='tplg path, default is environment variable: TPLG'
OPT_HAS_ARG['t']=1 OPT_VAL['t']="$TPLG"

func_opt_parse_option "$@"
Expand Down Expand Up @@ -106,13 +108,12 @@ setup_kernel_check_point

func_pipeline_export "$tplg" "type:$test_mode & ${OPT_VAL['S']}"

for idx in $(seq 0 $(expr $PIPELINE_COUNT - 1))
for idx in $(seq 0 $((PIPELINE_COUNT - 1)))
do
channel=$(func_pipeline_parse_value "$idx" channel)
rate=$(func_pipeline_parse_value "$idx" rate)
fmt=$(func_pipeline_parse_value "$idx" fmt)
dev=$(func_pipeline_parse_value "$idx" dev)
snd=$(func_pipeline_parse_value "$idx" snd)

dlogi "Entering audio stream expect script with:
$cmd -D $dev -r $rate -c $channel -f $fmt -vv -i $file_name -q"
Expand Down Expand Up @@ -178,8 +179,7 @@ AUDIO
#flush the output
echo
if [ $ret -ne 0 ]; then
sof-process-kill.sh
[[ $? -ne 0 ]] && dlogw "Kill process catch error"
sof-process-kill.sh || dlogw "Kill process catch error"
exit $ret
fi
sof-kernel-log-check.sh "$KERNEL_CHECKPOINT" || die "Caught error in kernel log"
Expand Down

0 comments on commit 4eb3a0d

Please sign in to comment.