diff options
author | Leander Beernaert <leander.beernaert@qt.io> | 2020-03-11 14:17:50 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-03-11 13:46:51 +0000 |
commit | 3c85440b16e2883a7e359f21b95100d868270d4f (patch) | |
tree | da66460c4d41515ea656d79410e7d6cb89fa2bf4 /coin | |
parent | c977e74afd18afff8729070f631e6b7a3f2887f5 (diff) |
CMake: Build standalone tests out of source in Coin
Due to a bug in upstream CMake regarding relative paths being encoded
into the build.ninja file when performing in source builds, we need to
build the tests in a standalone directory outside of the source
directory.
Failing to do so will cause the source directory for the test to be
incorrect which can cause tests to fails and never read the
BLACKLIST.txt file. See the mentioned issue for details.
Task-number: QTBUG-82820
Change-Id: Ie5c178a92369d6b9decff625bd9641e53088a9fa
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'coin')
-rw-r--r-- | coin/instructions/cmake_build_and_upload_test_artifacts.yaml | 4 | ||||
-rw-r--r-- | coin/instructions/cmake_regular_test_instructions.yaml | 8 |
2 files changed, 5 insertions, 7 deletions
diff --git a/coin/instructions/cmake_build_and_upload_test_artifacts.yaml b/coin/instructions/cmake_build_and_upload_test_artifacts.yaml index c818d60373..b6e5dc9902 100644 --- a/coin/instructions/cmake_build_and_upload_test_artifacts.yaml +++ b/coin/instructions/cmake_build_and_upload_test_artifacts.yaml @@ -3,9 +3,9 @@ instructions: - type: ChangeDirectory directory: "{{.SourceDir}}" - type: MakeDirectory - directory: "standalone_tests" + directory: "{{.SourceDir}}_standalone_tests" - type: SetBuildDirectory - directory: "{{.SourceDir}}/standalone_tests" + directory: "{{.SourceDir}}_standalone_tests" - type: ChangeDirectory directory: "{{.BuildDir}}" - type: EnvironmentVariable diff --git a/coin/instructions/cmake_regular_test_instructions.yaml b/coin/instructions/cmake_regular_test_instructions.yaml index 6974b293dd..46123dcf96 100644 --- a/coin/instructions/cmake_regular_test_instructions.yaml +++ b/coin/instructions/cmake_regular_test_instructions.yaml @@ -1,18 +1,16 @@ type: Group instructions: - - type: ChangeDirectory - directory: "{{.SourceDir}}" - type: MakeDirectory - directory: "standalone_tests" + directory: "{{.SourceDir}}_standalone_tests" - type: InstallTestBinaryArchive relativeStoragePath: "{{.Env.MODULE_ARTIFACTS_RELATIVE_STORAGE_PATH}}/tests.tar.gz" - directory: "{{.SourceDir}}/standalone_tests" + directory: "{{.SourceDir}}_standalone_tests" maxTimeInSeconds: 1200 maxTimeBetweenOutput: 1200 userMessageOnFailure: > Failed to install tests archive. - type: ChangeDirectory - directory: "{{.SourceDir}}/standalone_tests" + directory: "{{.SourceDir}}_standalone_tests" - type: ExecuteCommand command: "ctest -V --rerun-failed" ignoreExitCode: true |