mirror of
https://github.com/torvalds/linux.git
synced 2026-04-27 11:02:31 -04:00
perf test: Use common python setup library
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>
This commit is contained in:
committed by
Arnaldo Carvalho de Melo
parent
b809fc656e
commit
8226e4a3b3
@@ -8,20 +8,10 @@ set -e
|
||||
|
||||
skip_test=0
|
||||
|
||||
shelldir=$(dirname "$0")
|
||||
# shellcheck source=lib/setup_python.sh
|
||||
. "${shelldir}"/lib/setup_python.sh
|
||||
pythonchecker=$(dirname $0)/lib/perf_json_output_lint.py
|
||||
if [ "x$PYTHON" == "x" ]
|
||||
then
|
||||
if which python3 > /dev/null
|
||||
then
|
||||
PYTHON=python3
|
||||
elif which python > /dev/null
|
||||
then
|
||||
PYTHON=python
|
||||
else
|
||||
echo Skipping test, python not detected please set environment variable PYTHON.
|
||||
exit 2
|
||||
fi
|
||||
fi
|
||||
|
||||
stat_output=$(mktemp /tmp/__perf_test.stat_output.json.XXXXX)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user