diff options
author | Renato Araujo Oliveira Filho <renato.filho@canonical.com> | 2012-10-31 13:09:44 +0100 |
---|---|---|
committer | Renato Araujo Oliveira Filho <renato.filho@canonical.com> | 2012-10-31 13:09:44 +0100 |
commit | 49797fd4b489c31989d1e8a24e2b3bfa90b45825 (patch) | |
tree | fad17400c08252e801ffade6ad7b61ad815bfb4f /CMakeLists.txt | |
parent | 07087af0ce285afa96565e851f3e65f20620fae5 (diff) | |
download | qmenumodel-49797fd4b489c31989d1e8a24e2b3bfa90b45825.tar.gz qmenumodel-49797fd4b489c31989d1e8a24e2b3bfa90b45825.tar.bz2 qmenumodel-49797fd4b489c31989d1e8a24e2b3bfa90b45825.zip |
Added xvfb option on cmake to enable run tests without X running.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 10 |
1 files changed, 10 insertions, 0 deletions
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() |