diff --git a/coin/instructions/cmake_run_ctest.yaml b/coin/instructions/cmake_run_ctest.yaml new file mode 100644 index 00000000..c70037ff --- /dev/null +++ b/coin/instructions/cmake_run_ctest.yaml @@ -0,0 +1,29 @@ +type: Group +instructions: + - type: AppendToEnvironmentVariable + variableName: CTEST_ARGS + variableValue: " -V" + + - type: AppendToEnvironmentVariable + variableName: CTEST_ARGS + variableValue: " --stop-on-failure" + enable_if: + condition: property + property: features + contains_value: AbortTestingOnFirstFailure + + - type: AppendToEnvironmentVariable + variableName: CTEST_ARGS + variableValue: " --no-label-summary" + + - type: Group + instructions: + - type: ExecuteCommand + command: "{{.Env.TESTS_ENV_PREFIX}} ctest {{.Env.CTEST_ARGS}}" + executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution + ignoreExitCode: false + maxTimeInSeconds: 14400 + maxTimeBetweenOutput: 14400 + userMessageOnFailure: > + Failed to run tests. + diff --git a/coin/instructions/coin_run_top_level_cmake_tests.yaml b/coin/instructions/coin_run_top_level_cmake_tests.yaml new file mode 100644 index 00000000..fecc3d54 --- /dev/null +++ b/coin/instructions/coin_run_top_level_cmake_tests.yaml @@ -0,0 +1,27 @@ +type: Group +instructions: + - !include "{{qt/qtbase}}/prepare_building_env.yaml" + + - type: SetBuildDirectory + directory: "{{.SourceDir}}/run_cmake_tests_build" + - type: MakeDirectory + directory: "{{.BuildDir}}" + - type: ChangeDirectory + directory: "{{.BuildDir}}" + + - type: EnvironmentVariable + variableName: COIN_CMAKE_ARGS + variableValue: "{{.Env.CMAKE_ARGS}} {{.Env.COMMON_CMAKE_ARGS}}" + - type: EnvironmentVariable + variableName: CONFIGURE_ENV_PREFIX + variableValue: "{{.Env.ENV_PREFIX}}" + + - type: ExecuteCommand + command: "{{.Env.CONFIGURE_ENV_PREFIX}} cmake {{.SourceDir}}/tests/manual/RunCMake" + executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution + maxTimeInSeconds: 6000 + maxTimeBetweenOutput: 1200 + userMessageOnFailure: > + Failed to configure the RunCMake tests. + + - !include "{{qt/qt5}}/cmake_run_ctest.yaml" diff --git a/coin/module_config.yaml b/coin/module_config.yaml index 3de784a2..9857a434 100644 --- a/coin/module_config.yaml +++ b/coin/module_config.yaml @@ -6,7 +6,26 @@ accept_configuration: instructions: Build: - - !include "{{qt/qt5}}/coin_qt_build_template.yaml" + - type: Group + instructions: + - !include "{{qt/qt5}}/coin_qt_build_template.yaml" + enable_if: + condition: property + property: features + not_contains_value: "TopLevelRunCMakeTests" + - type: Group + instructions: + - !include "{{qt/qt5}}/coin_run_top_level_cmake_tests.yaml" + enable_if: + condition: property + property: features + contains_value: "TopLevelRunCMakeTests" Test: - - !include "{{qt/qt5}}/coin_bic_tests.yaml" + - type: Group + instructions: + - !include "{{qt/qt5}}/coin_bic_tests.yaml" + enable_if: + condition: property + property: features + not_contains_value: "TopLevelRunCMakeTests"