diff options
author | Brad King <brad.king@kitware.com> | 2009-11-30 21:31:28 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-11-30 21:31:28 (GMT) |
commit | 88eefaced14bee4bffb7f1dd1c5a2aa02bc97101 (patch) | |
tree | 5ca0860d163049b5ac50a0c68eea867c1b2fccf9 /Tests/CTestTestTimeout/timeout.cmake | |
parent | 2aaa96771558799f07b9a8562b69f58cf580b041 (diff) | |
download | CMake-88eefaced14bee4bffb7f1dd1c5a2aa02bc97101.zip CMake-88eefaced14bee4bffb7f1dd1c5a2aa02bc97101.tar.gz CMake-88eefaced14bee4bffb7f1dd1c5a2aa02bc97101.tar.bz2 |
CTest: Test process tree kill on timeout
We extend the CTestTestTimeout test to check that when a test times out
its children (grandchildren of ctest) are killed. Instead of running
the timeout executable directly, we run it through a cmake script that
redirects the timeout executable output to a file. A second test later
runs and verifies that the timeout executable was unable to complete and
write data to the log file. Only if the first inner test times out and
the second inner test passes (log is empty) does the CTestTestTimeout
test pass.
Diffstat (limited to 'Tests/CTestTestTimeout/timeout.cmake')
-rw-r--r-- | Tests/CTestTestTimeout/timeout.cmake | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Tests/CTestTestTimeout/timeout.cmake b/Tests/CTestTestTimeout/timeout.cmake new file mode 100644 index 0000000..198cc97 --- /dev/null +++ b/Tests/CTestTestTimeout/timeout.cmake @@ -0,0 +1,6 @@ +# Remove the log file. +file(REMOVE ${Log}) + +# Run a child that sleeps longer than the timout of this test. +# Log its output so check.cmake can verify it dies. +execute_process(COMMAND ${Timeout} OUTPUT_FILE ${Log}) |