Skip to content

Commit d65552c

Browse files
committed
test json fix
1 parent ea3af5e commit d65552c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test-case/check-suspend-resume.sh

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ OPT_HAS_ARG['r']=0 OPT_VAL['r']=0
4848
OPT_NAME['p']='processid' OPT_DESC['p']='Fail immediately if this process dies'
4949
OPT_HAS_ARG['p']=1 OPT_VAL['p']=''
5050

51-
OPT_NAME['s']='run-sleepgraph' OPT_DESC['s']='run with sleepgraph (http://github.com/intel/pm-graph.git)'
51+
OPT_NAME['s']='sleepgraph' OPT_DESC['s']='run with sleepgraph (http://github.com/intel/pm-graph.git)'
5252
OPT_HAS_ARG['s']=0 OPT_VAL['s']=0
5353

54-
OPT_NAME['t']='times-thresholds' OPT_DESC['t']='sleepgraph thresholds'
54+
OPT_NAME['t']='resume-time' OPT_DESC['t']='resume time threshold'
5555
OPT_HAS_ARG['t']=1 OPT_VAL['t']=''
5656

5757
func_opt_parse_option "$@"
@@ -189,7 +189,10 @@ analyze_sleepgraph_results()
189189
dlogi "Analyzing sleepgraph results"
190190
results_file=$(find suspend-*/*.html)
191191
cp "$results_file" "$LOG_ROOT/"
192-
thresholds="${OPT_VAL['t']}"
192+
193+
thresholds=$( jq -n \
194+
--arg resume_time "${OPT_VAL['t']}" \
195+
'{"sof-audio-pci-intel-ptl":{"resume":$resume_time}}')
193196

194197
dlogi "Analyzing $results_file file..."
195198
if python3 "$SCRIPT_HOME"/tools/analyze-sleepgraph-results.py "$results_file" "$thresholds"; then

0 commit comments

Comments
 (0)