aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/tests/attr.c
diff options
context:
space:
mode:
authorNamhyung Kim <namhyung.kim@lge.com>2012-12-17 16:25:01 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2013-01-24 16:40:10 -0300
commit000ae33fdb5ff7bc7ae985b43e6278024a4985c2 (patch)
tree258ecac95d13e80915e0c1c5a3e67973dcba73fa /tools/perf/tests/attr.c
parentperf tests: Add event parsing test for '*:*' tracepoints (diff)
downloadlinux-dev-000ae33fdb5ff7bc7ae985b43e6278024a4985c2.tar.xz
linux-dev-000ae33fdb5ff7bc7ae985b43e6278024a4985c2.zip
perf tests: Check python path on attr and binding test
Current perf test code tries to execute python version 2 in order to test attributes on perf_event_open syscall. However it's not default python version anymore a system can have python v3 only or v2 with a different name (e.g. python2). So if there's no such python interpreter with the name 'python', the test would fail like this (yes, it's happened on my new archlinux laptop :). 13: struct perf_event_attr setup :sh: python: command not found FAILED! As we can pass name of the python interpreter on make, use it for the attr test also. Signed-off-by: Namhyung Kim <namhyung@kernel.org> Acked-by: Jiri Olsa <jolsa@redhat.com> Cc: Ingo Molnar <mingo@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Paul Mackerras <paulus@samba.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1355729101-31317-1-git-send-email-namhyung@kernel.org [ committer note: Added the same mechanism to the python binding test ] Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/tests/attr.c')
-rw-r--r--tools/perf/tests/attr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/tests/attr.c b/tools/perf/tests/attr.c
index 05b5acbabe5d..f61dd3fb546b 100644
--- a/tools/perf/tests/attr.c
+++ b/tools/perf/tests/attr.c
@@ -144,7 +144,7 @@ static int run_dir(const char *d, const char *perf)
{
char cmd[3*PATH_MAX];
- snprintf(cmd, 3*PATH_MAX, "python %s/attr.py -d %s/attr/ -p %s %s",
+ snprintf(cmd, 3*PATH_MAX, PYTHON " %s/attr.py -d %s/attr/ -p %s %s",
d, d, perf, verbose ? "-v" : "");
return system(cmd);