From: José Fonseca Date: Mon, 10 Dec 2012 18:54:24 +0000 (+0000) Subject: Don't run tests that depend on PIL. X-Git-Url: https://git.cworth.org/git?p=apitrace-tests;a=commitdiff_plain;h=883a8b3506e6818add1c162ce8de690afcfe79e3;hp=b2cfdb1056b50c01e54384b6d34499e4df712229 Don't run tests that depend on PIL. Unfortunately it is non-standard and binaries hard to get by on MacOSX. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 7c55f76..2dff857 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,6 +47,19 @@ elseif (PKG_CONFIG_FOUND) pkg_check_modules (GLESV2 glesv2) endif () +# Check for the presence of several python packages, which are needed to build +# generated tests. +execute_process( + COMMAND ${python} -c "import PIL" + OUTPUT_QUIET + ERROR_QUIET + RESULT_VARIABLE IMPORT_PIL_RESULT) +if (IMPORT_PIL_RESULT EQUAL 0) + set (PIL_FOUND 1) +else () + message (STATUS "python PIL module not found") +endif () + if (UNIX) link_libraries(m) endif (UNIX) @@ -101,7 +114,7 @@ add_subdirectory (traces) # dumping images, etc. At that point these cli tests should be usable # with all targets so that we can drop the "if (OPENGL_FOUND)" # condition here. -if (OPENGL_FOUND) +if (OPENGL_FOUND AND PIL_FOUND) add_subdirectory (cli) add_subdirectory (trim_stress) endif ()