summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUwe Klotz <uklotz@mixxx.org>2020-12-04 20:27:53 +0100
committerUwe Klotz <uklotz@mixxx.org>2020-12-04 21:56:32 +0100
commit679e8b467c33a982758dde920d14748b5d7ed7d0 (patch)
treed7335b03d0101e4d67922ada733564e050079c0c
parent831e9c5263d5047ac7a488aa4908f6b86eda68d4 (diff)
Use Qt platform plugin "offscreen" for tests
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1c1d51d1ce..303f47ab0a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1425,6 +1425,12 @@ gtest_add_tests(
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
TEST_LIST testsuite
)
+if (NOT WIN32)
+ # Default to offscreen rendering during tests.
+ # This is required if the build system like Fedora koji/mock does not
+ # allow to pass environment variables into the ctest macro expansion.
+ set_tests_properties(${testsuite} PROPERTIES ENVIRONMENT "QT_QPA_PLATFORM=offscreen")
+endif()
# Benchmarking
add_custom_target(mixxx-benchmark