]> Git Repo - linux.git/blob - tools/perf/tests/shell/stat_metrics_values.sh
x86/alternative: Make custom return thunk unconditional
[linux.git] / tools / perf / tests / shell / stat_metrics_values.sh
1 #!/bin/bash
2 # perf metrics value validation
3 # SPDX-License-Identifier: GPL-2.0
4 if [ "x$PYTHON" == "x" ]
5 then
6         if which python3 > /dev/null
7         then
8                 PYTHON=python3
9         else
10                 echo Skipping test, python3 not detected please set environment variable PYTHON.
11                 exit 2
12         fi
13 fi
14
15 grep -q GenuineIntel /proc/cpuinfo || { echo Skipping non-Intel; exit 2; }
16
17 pythonvalidator=$(dirname $0)/lib/perf_metric_validation.py
18 rulefile=$(dirname $0)/lib/perf_metric_validation_rules.json
19 tmpdir=$(mktemp -d /tmp/__perf_test.program.XXXXX)
20 workload="perf bench futex hash -r 2 -s"
21
22 # Add -debug, save data file and full rule file
23 echo "Launch python validation script $pythonvalidator"
24 echo "Output will be stored in: $tmpdir"
25 $PYTHON $pythonvalidator -rule $rulefile -output_dir $tmpdir -wl "${workload}"
26 ret=$?
27 rm -rf $tmpdir
28
29 exit $ret
30
This page took 0.035815 seconds and 4 git commands to generate.