diff options
Diffstat (limited to 'Tests/RunCMake/CTestResourceAllocation/test.cmake.in')
-rw-r--r-- | Tests/RunCMake/CTestResourceAllocation/test.cmake.in | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Tests/RunCMake/CTestResourceAllocation/test.cmake.in b/Tests/RunCMake/CTestResourceAllocation/test.cmake.in index 4b426f1..54eb4e9 100644 --- a/Tests/RunCMake/CTestResourceAllocation/test.cmake.in +++ b/Tests/RunCMake/CTestResourceAllocation/test.cmake.in @@ -8,15 +8,21 @@ 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 +set(config_options "-DCTEST_RESOURCE_ALLOC_ENABLED=${CTEST_RESOURCE_ALLOC_ENABLED};-DCTRESALLOC_COMMAND=${CTRESALLOC_COMMAND}" ) -ctest_build() -if(CTEST_RESOURCE_ALLOC_ENABLED) +if(CTEST_RESOURCE_SPEC_SOURCE STREQUAL "ARG") set(resspec RESOURCE_SPEC_FILE "@RunCMake_SOURCE_DIR@/resspec.json") +elseif(CTEST_RESOURCE_SPEC_SOURCE STREQUAL "VARIABLE") + set(CTEST_RESOURCE_SPEC_FILE "@RunCMake_SOURCE_DIR@/resspec.json") +elseif(CTEST_RESOURCE_SPEC_SOURCE STREQUAL "CACHE") + list(APPEND config_options "-DCTEST_RESOURCE_SPEC_FILE=@RunCMake_SOURCE_DIR@/resspec.json") endif() + +ctest_start(Experimental QUIET) +ctest_configure(OPTIONS "${config_options}") +ctest_build() ctest_test(${resspec} RETURN_VALUE retval PARALLEL_LEVEL ${CTEST_PARALLEL} SCHEDULE_RANDOM ${CTEST_RANDOM}) if(retval) message(FATAL_ERROR "Tests did not pass") |