From 9db608438705538c28e81702255a84e2c3d479b8 Mon Sep 17 00:00:00 2001 From: ispyisail Date: Mon, 28 Sep 2026 22:04:30 +1300 Subject: [PATCH] Build tst_scriptconductoruuid only where --run exists The test runs a script through --run, which a build without the Qt Qml module does not have (QET_HAS_SCRIPTING). Linux CI installs no Qml package, so the binary took the script for a project to open and the test waited out its 60 s. The test is now built only when scripting is: a configure with Qt6Qml disabled lists 24 tests, without it; with Qml it runs and passes as before. Co-Authored-By: Claude Opus 5.5 --- tests/qttest/CMakeLists.txt | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/tests/qttest/CMakeLists.txt b/tests/qttest/CMakeLists.txt index 64a3b8cd0..9456b5bf4 100644 --- a/tests/qttest/CMakeLists.txt +++ b/tests/qttest/CMakeLists.txt @@ -331,12 +331,16 @@ target_compile_definitions(tst_conductorselfretrace PRIVATE # qet.conductorUuids() / qet.conductorEnds(): a script lists a folio's # conductors by uuid and finds each one's two ends. Runs a script through -# the real binary's --run on fixtures/qet_bug_repro_resaved.qet. -add_executable( - tst_scriptconductoruuid - tst_scriptconductoruuid.cpp) -add_test(NAME tst_scriptconductoruuid COMMAND tst_scriptconductoruuid) -add_dependencies(tst_scriptconductoruuid qelectrotech) -target_link_libraries(tst_scriptconductoruuid PRIVATE Qt::Test) -target_compile_definitions(tst_scriptconductoruuid PRIVATE - "QET_TEST_BINARY_PATH=\"$\"") +# the real binary's --run on fixtures/qet_bug_repro_resaved.qet, so only +# where --run exists: a build without the Qt Qml module has no scripting +# (see QET_HAS_SCRIPTING in the top-level CMakeLists.txt). +if(QET_HAS_SCRIPTING) + add_executable( + tst_scriptconductoruuid + tst_scriptconductoruuid.cpp) + add_test(NAME tst_scriptconductoruuid COMMAND tst_scriptconductoruuid) + add_dependencies(tst_scriptconductoruuid qelectrotech) + target_link_libraries(tst_scriptconductoruuid PRIVATE Qt::Test) + target_compile_definitions(tst_scriptconductoruuid PRIVATE + "QET_TEST_BINARY_PATH=\"$\"") +endif()