Skip to content

Commit

Permalink
test-case: enable four scripts for legacy HDA test
Browse files Browse the repository at this point in the history
Signed-off-by: Amery Song <chao.song@intel.com>
  • Loading branch information
Amery Song committed Oct 22, 2020
1 parent 2e63252 commit f16499e
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 4 deletions.
4 changes: 3 additions & 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:any & ${OPT_VALUE_lst['S']}"

for round in $(seq 1 $round_cnt)
do
Expand All @@ -75,6 +75,8 @@ do
type=$(func_pipeline_parse_value $idx type)
snd=$(func_pipeline_parse_value $idx snd)

[ "$type" = "capture" ] || continue

if [ ${OPT_VALUE_lst['F']} = '1' ]; then
fmt=$(func_pipeline_parse_value $idx fmts)
fi
Expand Down
5 changes: 4 additions & 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:any & ${OPT_VALUE_lst['S']}"
func_lib_setup_kernel_last_line
for idx in $(seq 0 $(expr $PIPELINE_COUNT - 1))
do
Expand All @@ -84,6 +84,9 @@ do
dev=$(func_pipeline_parse_value $idx dev)
snd=$(func_pipeline_parse_value $idx snd)

type=$(func_pipeline_parse_value $idx type)
[ "$type" = "$test_mode" ] || continue

dlogi "Entering expect script with: $cmd -D $dev -r $rate -c $channel -f $fmt -vv -i $file_name -q"

# expect is tcl language script
Expand Down
4 changes: 3 additions & 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:any & ${OPT_VALUE_lst['S']}"

for round in $(seq 1 $round_cnt)
do
Expand All @@ -83,6 +83,8 @@ do
type=$(func_pipeline_parse_value "$idx" type)
snd=$(func_pipeline_parse_value "$idx" snd)

[ "$type" = "playback" ] || continue

if [ ${OPT_VALUE_lst['F']} = '1' ]; then
fmts=$(func_pipeline_parse_value "$idx" fmts)
fi
Expand Down
5 changes: 4 additions & 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:any"
tcnt=${OPT_VALUE_lst['l']}
func_lib_setup_kernel_last_line
for idx in $(seq 0 $(expr $PIPELINE_COUNT - 1))
Expand All @@ -41,6 +41,9 @@ do
dev=$(func_pipeline_parse_value $idx dev)
snd=$(func_pipeline_parse_value $idx snd)

type=$(func_pipeline_parse_value $idx type)
[ "$type" = "playback" ] || continue

dlogc "speaker-test -D $dev -r $rate -c $channel -f $fmt -l $tcnt -t wav -P 8"
speaker-test -D $dev -r $rate -c $channel -f $fmt -l $tcnt -t wav -P 8 2>&1 |tee $LOG_ROOT/result_$idx.txt
resultRet=$?
Expand Down

0 comments on commit f16499e

Please sign in to comment.