test.cmake.in 957 B

1234567891011121314151617181920212223
  1. set(CTEST_SITE "test-site")
  2. set(CTEST_BUILD_NAME "test-build-name")
  3. set(CTEST_SOURCE_DIRECTORY "@RunCMake_BINARY_DIR@/@CASE_NAME@")
  4. set(CTEST_BINARY_DIRECTORY "@RunCMake_BINARY_DIR@/@CASE_NAME@-build")
  5. set(CTEST_CMAKE_GENERATOR "@RunCMake_GENERATOR@")
  6. set(CTEST_CMAKE_GENERATOR_PLATFORM "@RunCMake_GENERATOR_PLATFORM@")
  7. set(CTEST_CMAKE_GENERATOR_TOOLSET "@RunCMake_GENERATOR_TOOLSET@")
  8. set(CTEST_BUILD_CONFIGURATION "$ENV{CMAKE_CONFIG_TYPE}")
  9. set(CTEST_NIGHTLY_START_TIME "01:00:00 UTC")
  10. ctest_start(Experimental QUIET)
  11. ctest_configure(OPTIONS
  12. "-DCTEST_RESOURCE_ALLOC_ENABLED=${CTEST_RESOURCE_ALLOC_ENABLED};-DCTRESALLOC_COMMAND=${CTRESALLOC_COMMAND}"
  13. )
  14. ctest_build()
  15. if(CTEST_RESOURCE_ALLOC_ENABLED)
  16. set(resspec RESOURCE_SPEC_FILE "@RunCMake_SOURCE_DIR@/resspec.json")
  17. endif()
  18. ctest_test(${resspec} RETURN_VALUE retval PARALLEL_LEVEL ${CTEST_PARALLEL} SCHEDULE_RANDOM ${CTEST_RANDOM})
  19. if(retval)
  20. message(FATAL_ERROR "Tests did not pass")
  21. endif()