mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
perf test: Set PERF_EXEC_PATH for script execution
[ Upstream commite4ef3ef1bc
] The task-analyzer.py script (actually every other scripts too) requires PERF_EXEC_PATH env to find dependent libraries and scripts. For scripts test to run correctly, it needs to set PERF_EXEC_PATH to the perf tool source directory. Instead of blindly update the env, let's check the directory structure to make sure it points to the correct location. Fixes:e8478b84d6
("perf test: add new task-analyzer tests") Cc: Petar Gligoric <petar.gligoric@rohde-schwarz.com> Cc: Hagen Paul Pfeifer <hagen@jauu.net> Cc: Aditya Gupta <adityag@linux.ibm.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Ingo Molnar <mingo@kernel.org> Acked-by: Ian Rogers <irogers@google.com> Signed-off-by: Namhyung Kim <namhyung@kernel.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
bf945eb7a3
commit
88f214b30c
1 changed files with 6 additions and 0 deletions
|
@ -5,6 +5,12 @@
|
||||||
tmpdir=$(mktemp -d /tmp/perf-script-task-analyzer-XXXXX)
|
tmpdir=$(mktemp -d /tmp/perf-script-task-analyzer-XXXXX)
|
||||||
err=0
|
err=0
|
||||||
|
|
||||||
|
# set PERF_EXEC_PATH to find scripts in the source directory
|
||||||
|
perfdir=$(dirname "$0")/../..
|
||||||
|
if [ -e "$perfdir/scripts/python/Perf-Trace-Util" ]; then
|
||||||
|
export PERF_EXEC_PATH=$perfdir
|
||||||
|
fi
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
rm -f perf.data
|
rm -f perf.data
|
||||||
rm -f perf.data.old
|
rm -f perf.data.old
|
||||||
|
|
Loading…
Reference in a new issue