From 2e38b3551ea0a6d69262f35cf916651fb1c101db Mon Sep 17 00:00:00 2001 From: Anna Schumaker Date: Mon, 26 Sep 2016 08:26:45 -0400 Subject: [PATCH] tests: Add a switch for disabling GUI tests NoWheyCreamery.com doesn't run an Xserver, so we can't run UI tests. Add a switch to disable these so test results can be reported accurately. Signed-off-by: Anna Schumaker --- .gitlab-ci.yml | 4 ++-- CMakeLists.txt | 1 + tests/CMakeLists.txt | 5 ++++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3bc2aaa2..e27bf59c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,9 +6,9 @@ stages: build: stage: build script: - - cmake . && make + - cmake -DCONFIG_DEBUG=ON && make test: stage: test script: - - cmake . && make tests + - cmake -DCONFIG_TESTING_VERBOSE=ON -DCONFIG_TESTING_GUI=OFF && make tests diff --git a/CMakeLists.txt b/CMakeLists.txt index dc940c8d..d26c7c58 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ project(Ocarina) # Various options for users option(CONFIG_DEBUG "Compile with debugging symbols" OFF) option(CONFIG_TESTING_VERBOSE "Enable verbose output when running tests" OFF) +option(CONFIG_TESTING_GUI "Enable running GUI tests (requires an X server)" ON) option(CONFIG_TESTING_ALBUM_ARTWORK "Enable album art fetching tests" ON) # Configure settings diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index b14d95e8..6263086e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -14,4 +14,7 @@ add_library(guilib OBJECT EXCLUDE_FROM_ALL ${gui} ${core}) add_subdirectory(Music/) add_subdirectory(core/) -add_subdirectory(gui/) + +if (CONFIG_TESTING_GUI) + add_subdirectory(gui/) +endif()