diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-06-25 15:45:50 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-06-26 22:14:04 +0200 |
commit | a2c772dc58162329a46918950f85e55339939499 (patch) | |
tree | 24f36bc733338d4fbc31698cffb37e691ac79fc5 /coin/instructions/cmake_setup_running_tests_env_vars.yaml | |
parent | 9a4391271b527e4489df2ffc44a503797e25b51b (diff) |
CMake: Use build environment prefix.bat when running tests
Tests like tst_qmake need the build environment to be able to build
apps / libraries. This is mostly needed for MSVC.
Set the TESTS_ENV_PREFIX env var to point to the proper prefix.bat
(host or target) and use that when running ctest.
Task-number: QTBUG-85240
Task-number: QTBUG-78449
Task-number: QTBUG-81365
Change-Id: I6fa68714202ac7fc703973fc772e03b84790a043
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Diffstat (limited to 'coin/instructions/cmake_setup_running_tests_env_vars.yaml')
-rw-r--r-- | coin/instructions/cmake_setup_running_tests_env_vars.yaml | 30 |
1 files changed, 30 insertions, 0 deletions
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 0000000000..f7eead7ce6 --- /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 |