diff options
| author | Karim Pinter <karim.pinter@qt.io> | 2026-09-17 16:15:11 +0300 |
|---|---|---|
| committer | Karim Pinter <karim.pinter@qt.io> | 2026-09-21 11:01:31 +0000 |
| commit | daad7dde9e4f8512adbccf3d8113e096f3d34afc (patch) | |
| tree | a77a52b48674a8d0076f8e91a49fe5314cb4fac1 | |
| parent | 61abcb17f61af40038ce3caeb1a2b219ca01f2ee (diff) | |
CMake tests: don't run cross-compiled test binaries on the host
The static-build-only tests test_import_static_shapes_plugin_resources
and cmake_qmlimportscanner passed BINARY/BINARY_ARGS unconditionally,
so the ctest --build-and-test run step executed the cross-compiled
binary on the build host. On VxWorks CI this fails with
/usr/lib/ld.so.1: No such file or directory
VxWorks is the first static, cross-compiled platform that reaches this
block at all: iOS returns from the file early, Android builds are
shared, and desktop static builds are not cross-compiled, which is why
the missing guard went unnoticed.
Fixes: QTBUG-150363
Pick-to: 6.12
Change-Id: Ifb6f3386e1f26e58cd0f5f6c9d8da2af600e23c2
Reviewed-by: Sami Shalayel <sami.shalayel@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| -rw-r--r-- | tests/auto/cmake/CMakeLists.txt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/auto/cmake/CMakeLists.txt b/tests/auto/cmake/CMakeLists.txt index 79d69ebaa3..60c70a365c 100644 --- a/tests/auto/cmake/CMakeLists.txt +++ b/tests/auto/cmake/CMakeLists.txt @@ -188,14 +188,20 @@ if(TARGET Qt::Quick) BINARY test_link_qml_module_without_target) endif() if(NOT QT6_IS_SHARED_LIBS_BUILD) + if(NOT CMAKE_CROSSCOMPILING) + set(static_shapes_run_args BINARY "${CMAKE_CTEST_COMMAND}" BINARY_ARGS "-V") + set(qis_run_args BINARY qis_test) + else() + set(static_shapes_run_args "") + set(qis_run_args "") + endif() _qt_internal_test_expect_pass(test_import_static_shapes_plugin_resources - BINARY "${CMAKE_CTEST_COMMAND}" - BINARY_ARGS "-V" + ${static_shapes_run_args} ) if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.21") _qt_internal_test_expect_pass(qmlimportscanner TESTNAME cmake_qmlimportscanner - BINARY qis_test + ${qis_run_args} ) endif() endif() |
