Skip to content

Commit

Permalink
check-capture.sh:
Browse files Browse the repository at this point in the history
Per issue #729, "Fix all shellcheck warnings".

Prior to this commit there were 13 in this file, now zero.
  • Loading branch information
greg-intel authored May 25, 2023
1 parent be515bf commit c557a7e
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions test-case/check-capture.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,21 +65,21 @@ func_pipeline_export "$tplg" "type:capture & ${OPT_VAL['S']}"

for round in $(seq 1 $round_cnt)
do
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)
pcm=$(func_pipeline_parse_value $idx pcm)
type=$(func_pipeline_parse_value $idx type)
snd=$(func_pipeline_parse_value $idx snd)
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)
pcm=$(func_pipeline_parse_value "$idx" pcm)
type=$(func_pipeline_parse_value "$idx" type)
snd=$(func_pipeline_parse_value "$idx" snd)

if [ ${OPT_VAL['F']} = '1' ]; then
fmt=$(func_pipeline_parse_value $idx fmts)
fmt=$(func_pipeline_parse_value "$idx" fmts)
fi

for fmt_elem in $(echo $fmt)
for fmt_elem in $fmt
do
for i in $(seq 1 $loop_cnt)
do
Expand All @@ -94,9 +94,9 @@ do
dlogi "using $file as capture output"
fi

arecord_opts -D$dev -r $rate -c $channel -f $fmt_elem -d $duration $file -v -q
if [[ $? -ne 0 ]]; then
func_lib_lsof_error_dump $snd
if ! arecord_opts -D"$dev" -r "$rate" -c "$channel" -f "$fmt_elem" -d $duration "$file" -v -q;
then
func_lib_lsof_error_dump "$snd"
die "arecord on PCM $dev failed at $i/$loop_cnt."
fi
done
Expand Down

0 comments on commit c557a7e

Please sign in to comment.