aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcelo Lira <marcelo.lira@openbossa.org>2010-08-13 14:15:52 -0300
committerMarcelo Lira <marcelo.lira@openbossa.org>2010-08-13 14:42:55 -0300
commit2b21d79f5439d982de2495d3a190c4f82f51e458 (patch)
tree9fa0dcd7d5ffd64e67a3114b741255d617d43273
parent8ea5127ccbb0a5d84313041559769bc40fc2ad67 (diff)
All tests using GUI aren't shown if the host machine has xvfb installed.
Unwanted graphical output from tests are redirected to a fake X server on Unix system. This depends on the presence of the Xvfb server. Reviewed by Hugo Parente <hugo.lima@openbossa.org> Reviewed by Luciano Wolf <luciano.wolf@openbossa.org>
-rw-r--r--CMakeLists.txt7
-rw-r--r--tests/CMakeLists.txt2
2 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b75d1f9cf..dd6b863a7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,6 +10,13 @@ find_package(PythonInterpWithDebug REQUIRED)
find_package(Shiboken 0.4.0 REQUIRED)
find_package(Qt4 4.5.0 REQUIRED)
+find_program(XVFB_RUN NAMES xvfb-run)
+set(XVFB_EXEC "")
+if (NOT ${XVFB_RUN} MATCHES "XVFB_RUN-NOTFOUND")
+ set(XVFB_EXEC ${XVFB_RUN})
+ message("Using xvfb-run to perform QtGui tests.")
+endif()
+
set(LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
set(LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is /lib${LIB_SUFFIX})" FORCE)
if(CMAKE_HOST_APPLE)
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 904d10694..a3f527841 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -18,7 +18,7 @@ macro(PYSIDE_TEST)
else()
message(WARNING "Ivalid call of macro PYSIDE_TEST")
endif()
- set(TEST_CMD ${CMAKE_SOURCE_DIR}/tests/run_test.sh ${libpyside_BINARY_DIR} "${CMAKE_BINARY_DIR}:${CMAKE_SOURCE_DIR}/tests/util" ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/${ARGV0}")
+ set(TEST_CMD ${XVFB_EXEC} ${CMAKE_SOURCE_DIR}/tests/run_test.sh ${libpyside_BINARY_DIR} "${CMAKE_BINARY_DIR}:${CMAKE_SOURCE_DIR}/tests/util" ${PYTHON_EXECUTABLE} "${CMAKE_CURRENT_SOURCE_DIR}/${ARGV0}")
add_test(${TEST_NAME} ${TEST_CMD})
set_tests_properties(${TEST_NAME} PROPERTIES
TIMEOUT ${CTEST_TESTING_TIMEOUT}