From 9ae930dc7c70dfbc8641d82756f2e533fac9ed23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Tue, 25 Nov 2025 13:51:34 +0100 Subject: [PATCH] Fix Unittest on Launchpad by partially reverting #15656 --- .github/workflows/checks.yml | 2 -- CMakeLists.txt | 8 ++++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 3c20713537e8..51240ac0f7ca 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -137,8 +137,6 @@ jobs: run: ctest --timeout 45 working-directory: build env: - # Render analyzer waveform tests to an offscreen buffer - QT_QPA_PLATFORM: offscreen GTEST_COLOR: 1 # Only use single thread to prevent *.gcna files from overwriting each other CTEST_PARALLEL_LEVEL: 1 diff --git a/CMakeLists.txt b/CMakeLists.txt index 01aa82d514fd..fd5417ae3f1b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2833,6 +2833,14 @@ if(BUILD_TESTING) DISCOVERY_MODE PRE_TEST ) + # 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" + ) + if(BUILD_BENCH) # Benchmarking add_custom_target(