From 4aee0f151e49148a6a51e996f42ec748ab58bbdb Mon Sep 17 00:00:00 2001 From: Renato Araujo Oliveira Filho Date: Wed, 31 Oct 2012 15:32:38 +0100 Subject: Revert last commit. --- CMakeLists.txt | 10 ++++++++++ tests/client/CMakeLists.txt | 1 + 2 files changed, 11 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 261335a..d22194c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -32,6 +32,16 @@ endif() add_subdirectory(libqmenumodel) # Tests Tools +set(XVFB_EXEC "") +option(USE_XVFB "Uses xvfb-run with the unit tests to avoid QtWidgets tests fails without X." FALSE) +if(USE_XVFB) + find_program(XVFB_RUN NAMES xvfb-run) + if (NOT ${XVFB_RUN} MATCHES "XVFB_RUN-NOTFOUND") + set(XVFB_EXEC ${XVFB_RUN} -a) + message(STATUS "Using xvfb-run to perform QtWidget tests.") + endif() +endif() + if(NOT DBUS_RUNNER) message(STATUS "dbus-test-runner not found tests disabled.") else() diff --git a/tests/client/CMakeLists.txt b/tests/client/CMakeLists.txt index 9bce370..9209cc8 100644 --- a/tests/client/CMakeLists.txt +++ b/tests/client/CMakeLists.txt @@ -9,6 +9,7 @@ macro(declare_test testname) ) add_test(${testname} + ${XVFB_EXEC} ${DBUS_RUNNER} --task ${CMAKE_CURRENT_BINARY_DIR}/${testname} --task-name Client --task ${CMAKE_CURRENT_SOURCE_DIR}/script_${testname}.py --task-name Server -- cgit v1.2.3