From f26d4def67898eefcd1b54f2ffb7d7bf019de48d Mon Sep 17 00:00:00 2001 From: Toni Saario Date: Wed, 19 Aug 2020 09:19:14 +0300 Subject: 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 --- coin/instructions/cmake_build_and_upload_test_artifacts.yaml | 12 ++++++++++++ .../cmake_build_and_upload_test_artifacts_host.yaml | 3 +++ .../cmake_build_and_upload_test_artifacts_target.yaml | 3 +++ 3 files changed, 18 insertions(+) (limited to 'coin') 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 -- cgit v1.2.3