summaryrefslogtreecommitdiffstats
path: root/coin/instructions
diff options
context:
space:
mode:
authorToni Saario <toni.saario@qt.io>2020-08-19 09:19:14 +0300
committerToni Saario <toni.saario@qt.io>2020-09-28 05:28:22 +0000
commitf26d4def67898eefcd1b54f2ffb7d7bf019de48d (patch)
tree74680903902ba3ce49e0207365fce83000736067 /coin/instructions
parent258bf0c58ebf725629c139bfb79a35ec3f00b0d9 (diff)
Read test specific configure arguments from environment
Reading configure arguments for tests from environment allows control of CMake args from outside of the module itself. TEST_CONFIGURE_ARGS is read and appended to host tests build and TARGET_TEST_CONFIGURE_ARGS respectively for target's tests. Change-Id: I8270b0254525aec24f7614cba2b90b291e5eb3d2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'coin/instructions')
-rw-r--r--coin/instructions/cmake_build_and_upload_test_artifacts.yaml12
-rw-r--r--coin/instructions/cmake_build_and_upload_test_artifacts_host.yaml3
-rw-r--r--coin/instructions/cmake_build_and_upload_test_artifacts_target.yaml3
3 files changed, 18 insertions, 0 deletions
diff --git a/coin/instructions/cmake_build_and_upload_test_artifacts.yaml b/coin/instructions/cmake_build_and_upload_test_artifacts.yaml
index 83a34bb91f..1ed88ff7d5 100644
--- a/coin/instructions/cmake_build_and_upload_test_artifacts.yaml
+++ b/coin/instructions/cmake_build_and_upload_test_artifacts.yaml
@@ -8,9 +8,21 @@ instructions:
directory: "{{.SourceDir}}_standalone_tests"
- type: ChangeDirectory
directory: "{{.BuildDir}}"
+ - type: AppendToEnvironmentVariable
+ variableName: COIN_CMAKE_ARGS
+ variableValue: " -DQT_BUILD_STANDALONE_TESTS=ON -DCMAKE_AUTOGEN_VERBOSE=ON -S {{.SourceDir}} -B ."
+ disable_if:
+ condition: runtime
+ env_var: COIN_CMAKE_ARGS
+ equals_value: null
- type: EnvironmentVariable
variableName: COIN_CMAKE_ARGS
variableValue: "-DQT_BUILD_STANDALONE_TESTS=ON -DCMAKE_AUTOGEN_VERBOSE=ON -S {{.SourceDir}} -B ."
+ enable_if:
+ condition: runtime
+ env_var: COIN_CMAKE_ARGS
+ equals_value: null
+
- !include "{{qt/qtbase}}/call_cmake_for_standalone_tests.yaml"
- type: ExecuteCommand
command: "{{.Env.TESTS_ENV_PREFIX}} cmake --build . --parallel -v"
diff --git a/coin/instructions/cmake_build_and_upload_test_artifacts_host.yaml b/coin/instructions/cmake_build_and_upload_test_artifacts_host.yaml
index e2cdd15407..847d095da9 100644
--- a/coin/instructions/cmake_build_and_upload_test_artifacts_host.yaml
+++ b/coin/instructions/cmake_build_and_upload_test_artifacts_host.yaml
@@ -8,6 +8,9 @@ instructions:
- type: EnvironmentVariable
variableName: INSTALL_DIR_FOR_CMAKE_TESTS
variableValue: "{{.InstallDir}}"
+ - type: EnvironmentVariable
+ variableName: COIN_CMAKE_ARGS
+ variableValue: "{{.Env.TEST_CONFIGURE_ARGS}}"
- !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts.yaml"
disable_if:
condition: property
diff --git a/coin/instructions/cmake_build_and_upload_test_artifacts_target.yaml b/coin/instructions/cmake_build_and_upload_test_artifacts_target.yaml
index 3dd2844537..b34d408f4a 100644
--- a/coin/instructions/cmake_build_and_upload_test_artifacts_target.yaml
+++ b/coin/instructions/cmake_build_and_upload_test_artifacts_target.yaml
@@ -19,6 +19,9 @@ instructions:
condition: property
property: host.os
equals_value: Windows
+ - type: EnvironmentVariable
+ variableName: COIN_CMAKE_ARGS
+ variableValue: "{{.Env.TARGET_TEST_CONFIGURE_ARGS}}"
- !include "{{qt/qtbase}}/cmake_build_and_upload_test_artifacts.yaml"
disable_if:
condition: property