Enable building tests on WoA cross compile

Note this change has no impact on it own on current integrations,
as it barely adds tests compilation.

It is required for qtwebengine on WoA story.

Do not run some tests:
(required for qt5 patch introducing woa test node)
 * cmake test as host tools are provided by mingw,
   but tests are run natively by WoA platform.
 * dbus as this does not run natively on Woa anyway
   due to missing dbus service.

Change-Id: Ifdb3e1b76a7feb906a9031815984c716618e3882
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 04d17b2e229cee5e63596832b021c2316d9e4a05)
This commit is contained in:
Michal Klocek 2025-02-25 15:55:22 +01:00
parent d8fc1a6fa2
commit e1d088b1e8
4 changed files with 11 additions and 15 deletions

View File

@ -55,13 +55,7 @@ instructions:
- type: Group
instructions:
- !include "{{qt/qtbase}}/cmake_cross_compilation_module_build_instructions.yaml"
- type: Group
instructions:
- !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts_target.yaml"
enable_if:
condition: property
property: target.osVersion
in_values: [Android_ANY, QEMU, IOS_ANY, QNX_710, WebAssembly, INTEGRITY, VxWorks]
- !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts_target.yaml"
enable_if:
condition: or
conditions:

View File

@ -46,13 +46,7 @@ instructions:
property: target.arch
equals_value: Multi
- !include "{{qt/qtbase}}/prepare_android_multi_abi_env.yaml"
- type: Group
instructions:
- !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts_target.yaml"
enable_if:
condition: property
property: target.osVersion
in_values: [Android_ANY, QEMU, IOS_ANY, QNX_710, WebAssembly, INTEGRITY, VxWorks]
- !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts_target.yaml"
enable_if:
condition: or
conditions:

View File

@ -7,7 +7,7 @@
set(run_dbus_tests OFF)
if (QT_FEATURE_dbus)
set(run_dbus_tests ON)
if(NOT CMAKE_CROSSCOMPILING AND TARGET Qt::DBus)
if((NOT CMAKE_CROSSCOMPILING OR WIN32) AND TARGET Qt::DBus)
execute_process(COMMAND dbus-send --session --type=signal / local.AutotestCheck.Hello
TIMEOUT 5
RESULT_VARIABLE dbus_session_test

View File

@ -75,6 +75,14 @@ if(UNIX AND NOT APPLE AND NOT WIN32 AND CMAKE_CROSSCOMPILING AND NOT QT_ENABLE_C
return()
endif()
# On coin for WoA we have hackish setup to reduce integration time where
# host tools are deliver by mingw, build is done as cross build
# and tests run natively on WoA, meaning tooling can not execute natively.
if(WIN32 AND CMAKE_CROSSCOMPILING)
message(STATUS "Running CMake tests is disabled when cross-compiling to WoA")
return()
endif()
set(required_packages Core Network Xml Sql Test TestInternalsPrivate)
set(optional_packages DBus Gui Widgets PrintSupport OpenGL Concurrent)