]> git.cworth.org Git - apitrace-tests/commitdiff
Fix test to correctly use cmake feature to find python executable
authorCarl Worth <cworth@cworth.org>
Mon, 28 Jan 2013 20:22:31 +0000 (07:22 +1100)
committerJosé Fonseca <jfonseca@vmware.com>
Mon, 28 Jan 2013 20:26:05 +0000 (20:26 +0000)
On my system, at least, there was no ${python} variable set, so the
tests for PIL were incorrectly failing, (such that many tests were not
being run at all).

Signed-off-by: José Fonseca <jfonseca@vmware.com>
CMakeLists.txt

index 2dff8574de0d8db7b37d5c3cc18e6d6b8c59d2e1..d9398c079f384add4d58697773c5e4412484ceba 100644 (file)
@@ -21,6 +21,7 @@ if (NOT EXISTS ${APITRACE_EXECUTABLE})
     message (WARNING "Please specify path to apitrace executable via APITRACE_EXECUTABLE")
 endif ()
 
+include (FindPythonInterp)
 include (FindPkgConfig)
 
 set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
@@ -50,7 +51,7 @@ endif ()
 # Check for the presence of several python packages, which are needed to build
 # generated tests.
 execute_process(
-    COMMAND ${python} -c "import PIL"
+    COMMAND ${PYTHON_EXECUTABLE} -c "import PIL"
     OUTPUT_QUIET
     ERROR_QUIET
     RESULT_VARIABLE IMPORT_PIL_RESULT)