Skip to content

Commit

Permalink
pause-release-suspend-resume: Change code to be compatible with GLK
Browse files Browse the repository at this point in the history
Add the -T parameter to specify the execution state of suspend-resume

Signed-off-by: wanzhuo.li <[email protected]>
  • Loading branch information
wanzhuo.li committed Sep 14, 2021
1 parent 9fd1f46 commit 9102091
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions test-case/check-pause-release-suspend-resume.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,11 @@ OPT_HAS_ARG['i']=1 OPT_VAL['i']='500'
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 path, default is environment variable: TPLG'
OPT_HAS_ARG['t']=1 OPT_VAL['t']="$TPLG"
OPT_NAME['t']='tplg' OPT_DESC['t']='tplg path, default is environment variable: TPLG'
OPT_HAS_ARG['t']=1 OPT_VAL['t']="$TPLG"

OPT_NAME['T']='type' OPT_DESC['T']="suspend/resume type from /sys/power/mem_sleep"
OPT_HAS_ARG['T']=1 OPT_VAL['T']=""

func_opt_parse_option "$@"

Expand All @@ -87,6 +90,12 @@ test_mode=${OPT_VAL['m']}
file_name=${OPT_VAL['F']}
tplg=${OPT_VAL['t']}

if [ -n "${OPT_VAL['T']}" ]; then
suspend_opts="-l 1 -T ${OPT_VAL['T']}"
else
suspend_opts="-l 1"
fi

case $test_mode in
"playback")
cmd=aplay
Expand Down Expand Up @@ -150,7 +159,7 @@ expect {
}
#enter suspend-resume cycle once per pause instance
set retval [catch { exec bash $CASEDIR/check-suspend-resume.sh -l 1 } msg]
set retval [catch { exec bash $CASEDIR/check-suspend-resume.sh $suspend_opts} msg]
#prints logs from suspend-resume test
puts \$msg
Expand Down Expand Up @@ -180,7 +189,7 @@ AUDIO
#flush the output
echo
if [ $ret -ne 0 ]; then
sof-process-kill.sh || dlogw "Kill process catch error"
sof-process-kill.sh || dlogw "sof-process-kill.sh failed"
exit $ret
fi
sof-kernel-log-check.sh "$KERNEL_CHECKPOINT" || die "Caught error in kernel log"
Expand Down

0 comments on commit 9102091

Please sign in to comment.