diff options
Diffstat (limited to 'Tests/RunCMake/CTestHardwareAllocation/test.cmake.in')
-rw-r--r-- | Tests/RunCMake/CTestHardwareAllocation/test.cmake.in | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/Tests/RunCMake/CTestHardwareAllocation/test.cmake.in b/Tests/RunCMake/CTestHardwareAllocation/test.cmake.in new file mode 100644 index 0000000..5ba3587 --- /dev/null +++ b/Tests/RunCMake/CTestHardwareAllocation/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_HARDWARE_ALLOC_ENABLED=${CTEST_HARDWARE_ALLOC_ENABLED};-DCTHWALLOC_COMMAND=${CTHWALLOC_COMMAND}" + ) +ctest_build() + +if(CTEST_HARDWARE_ALLOC_ENABLED) + set(hwspec HARDWARE_SPEC_FILE "@RunCMake_SOURCE_DIR@/hwspec.json") +endif() +ctest_test(${hwspec} RETURN_VALUE retval PARALLEL_LEVEL ${CTEST_PARALLEL} SCHEDULE_RANDOM ${CTEST_RANDOM}) +if(retval) + message(FATAL_ERROR "Tests did not pass") +endif() |