if test -z "$PYTHON"; then
AC_MSG_ERROR(['python3' binary is required to build libvirt])
fi
+AC_DEFINE_UNQUOTED([PYTHON], "$PYTHON", [path to python binary])
AC_PATH_PROG([FLAKE8], [flake8])
if test -z "$FLAKE8"; then
AC_MSG_WARN(['flake8' binary is required to check python code style])
static virBitmapPtr testBitmap;
char *progname;
-static char *python;
virArch virTestHostArch = VIR_ARCH_X86_64;
virStringHasSuffix(filename, ".ldargs")))
return 0;
- if (!python) {
- fprintf(stderr, "cannot rewrap %s: unable to find python in path", filename);
- return -1;
- }
-
script = g_strdup_printf("%s/scripts/test-wrap-argv.py", abs_top_srcdir);
- cmd = virCommandNewArgList(python, script, "--in-place", filename, NULL);
+ cmd = virCommandNewArgList(PYTHON, script, "--in-place", filename, NULL);
if (virCommandRun(cmd, NULL) < 0)
goto cleanup;
}
}
- /* Find python early because some tests override PATH */
- python = virFindFileInPath("python");
-
ret = (func)();
virResetLastError();
fprintf(stderr, " %-3zu %s\n", testCounter, ret == 0 ? "OK" : "FAIL");
}
virLogReset();
- VIR_FREE(python);
return ret;
}