diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2019-06-19 16:10:10 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2019-06-21 12:00:13 +0000 |
commit | b0bd50d33966d93ba5e24ac6be0c849ce501eed6 (patch) | |
tree | e74eabd48a0a58abc57b4728764f7996e6abeefc /coin | |
parent | 174d87063564978b7becfcfa0431271d89e9c9b6 (diff) | |
download | qtbase-b0bd50d33966d93ba5e24ac6be0c849ce501eed6.tar.gz |
Prepare for running tests with cmake
This is just a small step towards the situation where we build the tests
during the module build phase and later extract and merely run them.
The general steps we need are:
* build tests separately, which includes the cmake test plan
* let coin archive the tests (build) directory
* in the test VM unpack everything
* run ctest on the test plan that was part of the tests archive
This patch implements the first two steps.
Change-Id: Ifb8321015d0d18ad20e8cf20bb8b746030202daf
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
Diffstat (limited to 'coin')
-rw-r--r-- | coin/module_config.yaml | 35 |
1 files changed, 30 insertions, 5 deletions
diff --git a/coin/module_config.yaml b/coin/module_config.yaml index f15e07d498..210da62495 100644 --- a/coin/module_config.yaml +++ b/coin/module_config.yaml @@ -169,14 +169,11 @@ build_instructions: property: host.os equals_value: Windows - type: ExecuteCommand - command: "{{.Env.ENV_PREFIX}} cmake {{.Env.CONFIGURE_ARGS}} -DCMAKE_INSTALL_PREFIX:PATH={{.InstallDir}} -GNinja {{.SourceDir}}" + command: "{{.Env.ENV_PREFIX}} cmake {{.Env.CONFIGURE_ARGS}} -DCMAKE_INSTALL_PREFIX:PATH={{.InstallDir}} -DBUILD_TESTING=OFF -GNinja {{.SourceDir}}" maxTimeInSeconds: 6000 maxTimeBetweenOutput: 120 userMessageOnFailure: > Failed to call cmake. Contact Liang then. - - type: EnvironmentVariable - variableName: DESTDIR - variableValue: "{{.InstallRoot}}" - type: ExecuteCommand # TODO: remove me, just debuging command: cmd.exe /c type {{.BuildDir}}\\CMakeCache.txt enable_if: @@ -196,7 +193,16 @@ build_instructions: maxTimeInSeconds: 6000 maxTimeBetweenOutput: 120 userMessageOnFailure: > - Failed to install sources. In the current state bug can be everywhere. Contact Liang first. + Failed to install package. + - type: EnvironmentVariable + variableName: DESTDIR + variableValue: "{{.InstallRoot}}" + - type: ExecuteCommand + command: "{{.Env.ENV_PREFIX}} cmake --install ." + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 120 + userMessageOnFailure: > + Failed to install package for archiving. - type: SignPackage enable_if: condition: property @@ -210,6 +216,25 @@ build_instructions: transferType: UploadModuleBuildArtifact maxTimeInSeconds: 1200 maxTimeBetweenOutput: 1200 + - type: ChangeDirectory + directory: "{{.SourceDir}}/tests" + - type: ExecuteCommand + command: "{{.Env.ENV_PREFIX}} cmake {{.Env.CONFIGURE_ARGS}} -DCMAKE_PREFIX_PATH:PATH={{.InstallDir}} -GNinja {{.SourceDir}}/tests" + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 120 + userMessageOnFailure: > + Failed to call cmake. Contact Liang then. + - type: ExecuteCommand + command: "{{.Env.ENV_PREFIX}} cmake --build ." + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 120 + userMessageOnFailure: > + Failed to build sources. In the current state bug can be everywhere. Contact Liang first. + - type: UploadTestArtifact + transferType: UploadModuleTestsArtifact + archiveDirectory: "{{.SourceDir}}/tests" + maxTimeInSeconds: 1200 + maxTimeBetweenOutput: 1200 test_instructions: - type: ExecuteCommand command: echo "hello world - test" |