summaryrefslogtreecommitdiff
path: root/Tests/CTestTestTimeout/check.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/CTestTestTimeout/check.cmake')
-rw-r--r--Tests/CTestTestTimeout/check.cmake9
1 files changed, 9 insertions, 0 deletions
diff --git a/Tests/CTestTestTimeout/check.cmake b/Tests/CTestTestTimeout/check.cmake
new file mode 100644
index 000000000..b16f2aab9
--- /dev/null
+++ b/Tests/CTestTestTimeout/check.cmake
@@ -0,0 +1,9 @@
+# Block just as long as timeout.cmake would if it were not killed.
+execute_process(COMMAND ${Timeout})
+
+# Verify that the log is empty, which indicates that the grandchild
+# was killed before it finished sleeping.
+file(READ "${Log}" LOG)
+if(NOT "${LOG}" STREQUAL "")
+ message(FATAL_ERROR "${LOG}")
+endif()