From 3c85440b16e2883a7e359f21b95100d868270d4f Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Wed, 11 Mar 2020 14:17:50 +0100 Subject: 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 --- coin/instructions/cmake_build_and_upload_test_artifacts.yaml | 4 ++-- 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 -- cgit v1.2.3