1 // SPDX-License-Identifier: GPL-2.0
3 * Just test if we can load the python binding.
8 #include <linux/compiler.h>
10 #include "util/debug.h"
12 int test__python_use(struct test
*test __maybe_unused
, int subtest __maybe_unused
)
17 if (asprintf(&cmd
, "echo \"import sys ; sys.path.append('%s'); import perf\" | %s %s",
18 PYTHONPATH
, PYTHON
, verbose
> 0 ? "" : "2> /dev/null") < 0)
21 pr_debug("python usage test: \"%s\"\n", cmd
);
22 ret
= system(cmd
) ? -1 : 0;