diff options
author | Brad King <brad.king@kitware.com> | 2019-11-05 17:59:16 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-11-05 17:59:16 (GMT) |
commit | 016601e5e6f152403306c12997534aadd4287d38 (patch) | |
tree | 64af20c4200fd44061789bcb9bf6842fd8cb5ab0 /Tests/RunCMake/CTestResourceAllocation/test.cmake.in | |
parent | 370fe1495b4109430b2cb250dd3afd1ce9401cf6 (diff) | |
parent | c1435d98120dff203de01d75f8f91e99bc75fe2b (diff) | |
download | CMake-016601e5e6f152403306c12997534aadd4287d38.zip CMake-016601e5e6f152403306c12997534aadd4287d38.tar.gz CMake-016601e5e6f152403306c12997534aadd4287d38.tar.bz2 |
Merge branch 'backport-ctest-resource-groups'
Diffstat (limited to 'Tests/RunCMake/CTestResourceAllocation/test.cmake.in')
-rw-r--r-- | Tests/RunCMake/CTestResourceAllocation/test.cmake.in | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Tests/RunCMake/CTestResourceAllocation/test.cmake.in b/Tests/RunCMake/CTestResourceAllocation/test.cmake.in new file mode 100644 index 0000000..4b426f1 --- /dev/null +++ b/Tests/RunCMake/CTestResourceAllocation/test.cmake.in @@ -0,0 +1,23 @@ +set(CTEST_SITE "test-site") +set(CTEST_BUILD_NAME "test-build-name") +set(CTEST_SOURCE_DIRECTORY "@RunCMake_BINARY_DIR@/@CASE_NAME@") +set(CTEST_BINARY_DIRECTORY "@RunCMake_BINARY_DIR@/@CASE_NAME@-build") +set(CTEST_CMAKE_GENERATOR "@RunCMake_GENERATOR@") +set(CTEST_CMAKE_GENERATOR_PLATFORM "@RunCMake_GENERATOR_PLATFORM@") +set(CTEST_CMAKE_GENERATOR_TOOLSET "@RunCMake_GENERATOR_TOOLSET@") +set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}") +set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC") + +ctest_start(Experimental QUIET) +ctest_configure(OPTIONS + "-DCTEST_RESOURCE_ALLOC_ENABLED=${CTEST_RESOURCE_ALLOC_ENABLED};-DCTRESALLOC_COMMAND=${CTRESALLOC_COMMAND}" + ) +ctest_build() + +if(CTEST_RESOURCE_ALLOC_ENABLED) + set(resspec RESOURCE_SPEC_FILE "@RunCMake_SOURCE_DIR@/resspec.json") +endif() +ctest_test(${resspec} RETURN_VALUE retval PARALLEL_LEVEL ${CTEST_PARALLEL} SCHEDULE_RANDOM ${CTEST_RANDOM}) +if(retval) + message(FATAL_ERROR "Tests did not pass") +endif() |