qt5base-lts/coin/instructions/cmake_build_and_upload_test_artifacts.yaml
Toni Saario f26d4def67 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>
2020-09-28 05:28:22 +00:00

42 lines
1.4 KiB
YAML

type: Group
instructions:
- type: ChangeDirectory
directory: "{{.SourceDir}}"
- type: MakeDirectory
directory: "{{.SourceDir}}_standalone_tests"
- type: SetBuildDirectory
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"
maxTimeInSeconds: 6000
maxTimeBetweenOutput: 1200
userMessageOnFailure: >
Failed to build sources. In the current state bug can be everywhere.
- type: UploadTestArtifact
transferType: UploadModuleTestsArtifact
archiveDirectory: "{{.BuildDir}}"
maxTimeInSeconds: 1200
maxTimeBetweenOutput: 1200
disable_if:
condition: property
property: configureArgs
contains_value: "-DBUILD_SHARED_LIBS=OFF"