diff --git a/coin/instructions/cmake_regular_test_instructions.yaml b/coin/instructions/cmake_regular_test_instructions.yaml index 46123dcf961..f22196b2f92 100644 --- a/coin/instructions/cmake_regular_test_instructions.yaml +++ b/coin/instructions/cmake_regular_test_instructions.yaml @@ -12,7 +12,7 @@ instructions: - type: ChangeDirectory directory: "{{.SourceDir}}_standalone_tests" - type: ExecuteCommand - command: "ctest -V --rerun-failed" + command: "{{.Env.TESTS_ENV_PREFIX}} ctest -V --rerun-failed" ignoreExitCode: true maxTimeInSeconds: 7200 maxTimeBetweenOutput: 900 diff --git a/coin/instructions/cmake_setup_running_tests_env_vars.yaml b/coin/instructions/cmake_setup_running_tests_env_vars.yaml new file mode 100644 index 00000000000..f7eead7ce61 --- /dev/null +++ b/coin/instructions/cmake_setup_running_tests_env_vars.yaml @@ -0,0 +1,30 @@ +type: Group +instructions: + - type: Group + instructions: + - type: EnvironmentVariable + variableName: TESTS_ENV_PREFIX + variableValue: "{{.Env.ENV_PREFIX}}" + 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: + - type: EnvironmentVariable + variableName: TESTS_ENV_PREFIX + variableValue: "{{.Env.TARGET_ENV_PREFIX}}" + disable_if: + condition: and + conditions: + - condition: property + property: host.os + equals_property: target.os + - condition: property + property: target.osVersion + not_equals_value: QEMU diff --git a/coin/instructions/coin_module_test_template_v2.yaml b/coin/instructions/coin_module_test_template_v2.yaml index f4f65d7d375..786a59e03b9 100644 --- a/coin/instructions/coin_module_test_template_v2.yaml +++ b/coin/instructions/coin_module_test_template_v2.yaml @@ -2,6 +2,10 @@ type: Group instructions: - type: Group instructions: + # The build env is needed on MSVC so that tst_qmake can properly build apps / libraries. + - !include "{{qt/qtbase}}/prepare_building_env.yaml" + # The test env vars are needed to pick the proper prefix.bat file. + - !include "{{qt/qtbase}}/cmake_setup_running_tests_env_vars.yaml" - !include "{{qt/qtbase}}/coin_module_test_qemu_env_vars.yaml" - type: Group instructions: