mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-10-01 15:24:13 +02:00
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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=\"$<TARGET_FILE:qelectrotech>\"")
|
||||
# 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=\"$<TARGET_FILE:qelectrotech>\"")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user