Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test-case: add quotes to function arguments for func_export_pipeline #475

Merged
merged 1 commit into from
Oct 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test-case/check-audio-equalizer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ duration=${OPT_VALUE_lst['d']}
loop_cnt=${OPT_VALUE_lst['l']}

# import only EQ pipeline from topology
func_pipeline_export $tplg "eq:any"
func_pipeline_export "$tplg" "eq:any"
sofcard=${SOFCARD:-0}

# Test equalizer
Expand Down
2 changes: 1 addition & 1 deletion test-case/check-capture.sh
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ file_prefix=${OPT_VALUE_lst['f']}

func_lib_setup_kernel_last_line
func_lib_check_sudo
func_pipeline_export $tplg "type:capture & ${OPT_VALUE_lst['S']}"
func_pipeline_export "$tplg" "type:capture & ${OPT_VALUE_lst['S']}"

for round in $(seq 1 $round_cnt)
do
Expand Down
2 changes: 1 addition & 1 deletion test-case/check-fw-echo-reference.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ frequency=${OPT_VALUE_lst['f']}

[[ ${OPT_VALUE_lst['s']} -eq 1 ]] && func_lib_start_log_collect

func_pipeline_export $tplg "echo:any"
func_pipeline_export "$tplg" "echo:any"
func_lib_setup_kernel_last_line

if [ "$PIPELINE_COUNT" != "2" ]; then
Expand Down
2 changes: 1 addition & 1 deletion test-case/check-keyword-detection.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ duration=${OPT_VALUE_lst['d']}

[[ ${OPT_VALUE_lst['s']} -eq 1 ]] && func_lib_start_log_collect

func_pipeline_export $tplg "kpbm:any"
func_pipeline_export "$tplg" "kpbm:any"
func_lib_setup_kernel_last_line

if test "$PIPELINE_COUNT" != "1"; then
Expand Down
2 changes: 1 addition & 1 deletion test-case/check-kmod-load-unload-after-playback.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ tplg=${OPT_VALUE_lst['t']}
loop_cnt=${OPT_VALUE_lst['l']}
pb_duration=${OPT_VALUE_lst['d']}

func_pipeline_export $tplg "type:playback"
func_pipeline_export "$tplg" "type:playback"

func_lib_check_sudo
# overwrite the subscript: test-case LOG_ROOT environment
Expand Down
2 changes: 1 addition & 1 deletion test-case/check-pause-resume.sh
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ esac

[[ -z $file_name ]] && file_name=$dummy_file

func_pipeline_export $tplg "type:$test_mode & ${OPT_VALUE_lst['S']}"
func_pipeline_export "$tplg" "type:$test_mode & ${OPT_VALUE_lst['S']}"
func_lib_setup_kernel_last_line
for idx in $(seq 0 $(expr $PIPELINE_COUNT - 1))
do
Expand Down
2 changes: 1 addition & 1 deletion test-case/check-playback.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fi

func_lib_setup_kernel_last_line
func_lib_check_sudo
func_pipeline_export $tplg "type:playback & ${OPT_VALUE_lst['S']}"
func_pipeline_export "$tplg" "type:playback & ${OPT_VALUE_lst['S']}"

for round in $(seq 1 $round_cnt)
do
Expand Down
2 changes: 1 addition & 1 deletion test-case/check-runtime-pm-double-active.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ APP_LST['capture']='arecord'
DEV_LST['capture']='/dev/null'

[[ ${OPT_VALUE_lst['s']} -eq 1 ]] && func_lib_start_log_collect
func_pipeline_export $tplg "type:any"
func_pipeline_export "$tplg" "type:any"
func_lib_setup_kernel_last_line

for idx in $(seq 0 $(expr $PIPELINE_COUNT - 1))
Expand Down
2 changes: 1 addition & 1 deletion test-case/check-runtime-pm-status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ APP_LST['capture']='arecord'
DEV_LST['capture']='/dev/null'

[[ ${OPT_VALUE_lst['s']} -eq 1 ]] && func_lib_start_log_collect
func_pipeline_export $tplg "type:any"
func_pipeline_export "$tplg" "type:any"
func_lib_setup_kernel_last_line

for idx in $(seq 0 $(expr $PIPELINE_COUNT - 1))
Expand Down
2 changes: 1 addition & 1 deletion test-case/check-signal-stop-start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func_stop_start_pipeline()
done
}

func_pipeline_export $tplg "type:$test_mode"
func_pipeline_export "$tplg" "type:$test_mode"
for idx in $(seq 0 $(expr $PIPELINE_COUNT - 1))
do
channel=$(func_pipeline_parse_value $idx channel)
Expand Down
2 changes: 1 addition & 1 deletion test-case/check-smart-amplifier.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ tplg=${OPT_VALUE_lst['t']}

[[ ${OPT_VALUE_lst['s']} -eq 1 ]] && func_lib_start_log_collect

func_pipeline_export $tplg "smart_amp:any"
func_pipeline_export "$tplg" "smart_amp:any"
func_lib_setup_kernel_last_line

[ "$PIPELINE_COUNT" == "2" ] || die "Only detect $PIPELINE_COUNT pipeline(s) from topology, but two are needed"
Expand Down
2 changes: 1 addition & 1 deletion test-case/check-suspend-resume-with-audio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ else
fi
[[ -z $file_name ]] && file_name=$dummy_file

func_pipeline_export $tplg "type:${OPT_VALUE_lst['m']}"
func_pipeline_export "$tplg" "type:${OPT_VALUE_lst['m']}"

if [ "${OPT_VALUE_lst['T']}" ]; then
opt="-l ${OPT_VALUE_lst['l']} -T ${OPT_VALUE_lst['T']}"
Expand Down
2 changes: 1 addition & 1 deletion test-case/check-xrun-injection.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func_xrun_injection()
done
}

func_pipeline_export $tplg "type:$test_mode"
func_pipeline_export "$tplg" "type:$test_mode"
for idx in $(seq 0 $(expr $PIPELINE_COUNT - 1))
do
channel=$(func_pipeline_parse_value $idx channel)
Expand Down
2 changes: 1 addition & 1 deletion test-case/multiple-pause-resume.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ rnd_range=$[ $rnd_max - $rnd_min ]
[[ $rnd_range -le 0 ]] && dlogw "Error random range scope [ min:$rnd_min - max:$rnd_max ]" && exit 2

tplg=${OPT_VALUE_lst['t']}
func_pipeline_export $tplg "type:any"
func_pipeline_export "$tplg" "type:any"

[[ ${OPT_VALUE_lst['s']} -eq 1 ]] && func_lib_start_log_collect

Expand Down
4 changes: 2 additions & 2 deletions test-case/multiple-pipeline-capture.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ tplg=${OPT_VALUE_lst['t']}
[[ ${OPT_VALUE_lst['s']} -eq 1 ]] && func_lib_start_log_collect

max_count=0
func_pipeline_export $tplg "type:any" # this line will help to get $PIPELINE_COUNT
func_pipeline_export "$tplg" "type:any" # this line will help to get $PIPELINE_COUNT
# get the min value of TPLG:'pipeline count' with Case:'pipeline count'
[[ $PIPELINE_COUNT -gt ${OPT_VALUE_lst['c']} ]] && max_count=${OPT_VALUE_lst['c']} || max_count=$PIPELINE_COUNT
func_lib_setup_kernel_last_line
Expand All @@ -66,7 +66,7 @@ tmp_count=$max_count
func_run_pipeline_with_type()
{
[[ $tmp_count -le 0 ]] && return
func_pipeline_export $tplg "type:$1"
func_pipeline_export "$tplg" "type:$1"
local -a idx_lst
if [ ${OPT_VALUE_lst['r']} -eq 0 ]; then
idx_lst=( $(seq 0 $(expr $PIPELINE_COUNT - 1)) )
Expand Down
4 changes: 2 additions & 2 deletions test-case/multiple-pipeline-playback.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ tplg=${OPT_VALUE_lst['t']}
[[ ${OPT_VALUE_lst['s']} -eq 1 ]] && func_lib_start_log_collect

max_count=0
func_pipeline_export $tplg "type:any" # this line will help to get $PIPELINE_COUNT
func_pipeline_export "$tplg" "type:any" # this line will help to get $PIPELINE_COUNT
# get the min value of TPLG:'pipeline count' with Case:'pipeline count'
[[ $PIPELINE_COUNT -gt ${OPT_VALUE_lst['c']} ]] && max_count=${OPT_VALUE_lst['c']} || max_count=$PIPELINE_COUNT
func_lib_setup_kernel_last_line
Expand All @@ -66,7 +66,7 @@ tmp_count=$max_count
func_run_pipeline_with_type()
{
[[ $tmp_count -le 0 ]] && return
func_pipeline_export $tplg "type:$1"
func_pipeline_export "$tplg" "type:$1"
local -a idx_lst
if [ ${OPT_VALUE_lst['r']} -eq 0 ]; then
idx_lst=( $(seq 0 $(expr $PIPELINE_COUNT - 1)) )
Expand Down
2 changes: 1 addition & 1 deletion test-case/simultaneous-playback-capture.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ done
unset tmp_id_lst tplg_path
id_lst_str=${id_lst_str/,/} # remove 1st, which is not used
[[ ${#id_lst_str} -eq 0 ]] && dlogw "no pipeline with both playback and capture capabilities found in $tplg" && exit 2
func_pipeline_export $tplg "id:$id_lst_str"
func_pipeline_export "$tplg" "id:$id_lst_str"
[[ ${OPT_VALUE_lst['s']} -eq 1 ]] && func_lib_start_log_collect
func_lib_setup_kernel_last_line

Expand Down
2 changes: 1 addition & 1 deletion test-case/test-speaker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func_opt_parse_option "$@"
tplg=${OPT_VALUE_lst['t']}
[[ ${OPT_VALUE_lst['s']} -eq 1 ]] && func_lib_start_log_collect

func_pipeline_export $tplg "type:playback"
func_pipeline_export "$tplg" "type:playback"
tcnt=${OPT_VALUE_lst['l']}
func_lib_setup_kernel_last_line
for idx in $(seq 0 $(expr $PIPELINE_COUNT - 1))
Expand Down
2 changes: 1 addition & 1 deletion test-case/volume-basic-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func_error_exit()
}

[[ -z $tplg ]] && die "Missing tplg file needed to run"
func_pipeline_export $tplg "type:playback"
func_pipeline_export "$tplg" "type:playback"
[[ ${OPT_VALUE_lst['s']} -eq 1 ]] && func_lib_start_log_collect

[[ $PIPELINE_COUNT -eq 0 ]] && die "Missing playback pipeline for aplay to run"
Expand Down