Avoid replicated logic by having a common library to set the PYTHON environment variable. Reviewed-by: Athira Jajeev <atrajeev@linux.vnet.ibm.com> Signed-off-by: Ian Rogers <irogers@google.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Ingo Molnar <mingo@redhat.com> Cc: James Clark <james.clark@arm.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Kan Liang <kan.liang@linux.intel.com> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: https://lore.kernel.org/r/20231129213428.2227448-3-irogers@google.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
24 lines
730 B
Bash
Executable file
24 lines
730 B
Bash
Executable file
#!/bin/bash
|
|
# perf metrics value validation
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
shelldir=$(dirname "$0")
|
|
# shellcheck source=lib/setup_python.sh
|
|
. "${shelldir}"/lib/setup_python.sh
|
|
|
|
grep -q GenuineIntel /proc/cpuinfo || { echo Skipping non-Intel; exit 2; }
|
|
|
|
pythonvalidator=$(dirname $0)/lib/perf_metric_validation.py
|
|
rulefile=$(dirname $0)/lib/perf_metric_validation_rules.json
|
|
tmpdir=$(mktemp -d /tmp/__perf_test.program.XXXXX)
|
|
workload="perf bench futex hash -r 2 -s"
|
|
|
|
# Add -debug, save data file and full rule file
|
|
echo "Launch python validation script $pythonvalidator"
|
|
echo "Output will be stored in: $tmpdir"
|
|
$PYTHON $pythonvalidator -rule $rulefile -output_dir $tmpdir -wl "${workload}"
|
|
ret=$?
|
|
rm -rf $tmpdir
|
|
|
|
exit $ret
|
|
|