summaryrefslogtreecommitdiff
path: root/Tests/RunCMake/CTestCommandLine/repeat-after-timeout-cmake.cmake
blob: 873c0bd6fbba7ade5e338682ee93bb4cfcddbca7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
enable_testing()

set(TEST_OUTPUT_FILE "${CMAKE_CURRENT_BINARY_DIR}/test_output.txt")
add_test(NAME initialization
  COMMAND ${CMAKE_COMMAND}
  "-DTEST_OUTPUT_FILE=${TEST_OUTPUT_FILE}"
  -P "${CMAKE_CURRENT_SOURCE_DIR}/init.cmake")
add_test(NAME test1
  COMMAND ${CMAKE_COMMAND}
  "-DTEST_OUTPUT_FILE=${TEST_OUTPUT_FILE}"
  -P "${CMAKE_CURRENT_SOURCE_DIR}/test1-timeout.cmake")
set_tests_properties(test1 PROPERTIES DEPENDS "initialization" TIMEOUT 5)

add_test(hello ${CMAKE_COMMAND} -E echo hello)
add_test(goodbye ${CMAKE_COMMAND} -E echo goodbye)