qt5base-lts/coin/instructions/coin_module_build_template_v2.yaml
Alexandru Croitor d8f814cdb7 CMake: Add instructions for building and testing qemu configs
Before this change, tests were never built for cross-compiling
configurations.

Add instructions that build and run tests for qemu configurations.
This required a bit of abstraction / indirection to find out what's
the path to the correct qt-cmake call, as well as prepending the
correct env prefix to each call (either the host one or the target
one).

Also, the QEMU configuration requires a few environment variables
to pick up the correct runtime linker and which qpa plugin to use
for running tests.

Finally, make sure the tests are not built and run if the DisableTests
feature is set in the configuration.

Task-number: QTBUG-84423
Change-Id: I0cec28c801a657e67cfa48f3c61cfe487109946b
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-06-25 14:11:56 +02:00

41 lines
1.3 KiB
YAML

type: Group
instructions:
- !include "{{qt/qtbase}}/prepare_building_env.yaml"
- type: Group
instructions:
- !include "{{qt/qtbase}}/cmake_module_build_instructions.yaml"
- !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts_host.yaml"
enable_if:
condition: and
conditions:
- condition: property
property: host.os
equals_property: target.os
- condition: property
property: target.osVersion
not_equals_value: QEMU
- 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: and
conditions:
- condition: property
property: host.os
equals_property: target.os
- condition: property
property: target.osVersion
equals_value: QEMU
disable_if:
condition: and
conditions:
- condition: property
property: host.os
equals_property: target.os
- condition: property
property: target.osVersion
not_equals_value: QEMU