summaryrefslogtreecommitdiffstats
path: root/Tests/CTestTestTimeout/CMakeLists.txt
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2014-05-23 13:47:44 (GMT)
committerBrad King <brad.king@kitware.com>2014-05-23 14:30:39 (GMT)
commit9afcecaf32acb4333b33d46522f98457bfa8856d (patch)
treec27da3ad5fcafddaf930e517b05c5c392e1e92af /Tests/CTestTestTimeout/CMakeLists.txt
parent8ae05b420e513252d1fd68dc6085d8dd92f3e624 (diff)
downloadCMake-9afcecaf32acb4333b33d46522f98457bfa8856d.zip
CMake-9afcecaf32acb4333b33d46522f98457bfa8856d.tar.gz
CMake-9afcecaf32acb4333b33d46522f98457bfa8856d.tar.bz2
Tests: Try to make CTestTestTimeout more robust
Write to the timeout test log file before sleeping and flush to be sure it is created. Move the check that the after-sleep line is not written out to the ctest script. Rename the CheckChild test to TestSleep since it no longer checks. Do not try to read the log file if it does not exist.
Diffstat (limited to 'Tests/CTestTestTimeout/CMakeLists.txt')
-rw-r--r--Tests/CTestTestTimeout/CMakeLists.txt12
1 files changed, 4 insertions, 8 deletions
diff --git a/Tests/CTestTestTimeout/CMakeLists.txt b/Tests/CTestTestTimeout/CMakeLists.txt
index 476d0a5..2e3bd6a 100644
--- a/Tests/CTestTestTimeout/CMakeLists.txt
+++ b/Tests/CTestTestTimeout/CMakeLists.txt
@@ -11,18 +11,14 @@ if(NOT TIMEOUT)
endif()
add_definitions(-DTIMEOUT=${TIMEOUT})
-add_executable (Timeout timeout.c)
+add_executable (Sleep sleep.c)
add_test(NAME TestTimeout
- COMMAND ${CMAKE_COMMAND} -D Timeout=$<TARGET_FILE:Timeout>
+ COMMAND ${CMAKE_COMMAND} -D Sleep=$<TARGET_FILE:Sleep>
-D Log=${CMAKE_CURRENT_BINARY_DIR}/timeout.log
-P ${CMAKE_CURRENT_SOURCE_DIR}/timeout.cmake
)
set_tests_properties(TestTimeout PROPERTIES TIMEOUT ${TIMEOUT})
-add_test(NAME CheckChild
- COMMAND ${CMAKE_COMMAND} -D Timeout=$<TARGET_FILE:Timeout>
- -D Log=${CMAKE_CURRENT_BINARY_DIR}/timeout.log
- -P ${CMAKE_CURRENT_SOURCE_DIR}/check.cmake
- )
-set_tests_properties(CheckChild PROPERTIES DEPENDS TestTimeout)
+add_test(NAME TestSleep COMMAND Sleep)
+set_tests_properties(TestSleep PROPERTIES DEPENDS TestTimeout)