Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/evalenti/linux...
[linux/fpc-iii.git] / tools / perf / tests / python-use.c
blob7a52834ee0d0e848802b104719ee7726e3b97aae
1 /*
2 * Just test if we can load the python binding.
3 */
5 #include <stdio.h>
6 #include <stdlib.h>
7 #include <linux/compiler.h>
8 #include "tests.h"
10 extern int verbose;
12 int test__python_use(int subtest __maybe_unused)
14 char *cmd;
15 int ret;
17 if (asprintf(&cmd, "echo \"import sys ; sys.path.append('%s'); import perf\" | %s %s",
18 PYTHONPATH, PYTHON, verbose ? "" : "2> /dev/null") < 0)
19 return -1;
21 ret = system(cmd) ? -1 : 0;
22 free(cmd);
23 return ret;