Zack Galbreath 993e48d045 CTest: Optionally use a secondary test timeout after matching output
Allow a test N seconds to complete after we detect a matching line in
its output.  Activate this behavior with a new TIMEOUT_AFTER_MATCH test
property.
2016-03-22 11:17:55 -04:00

12 lines
429 B
CMake

include(RunCTest)
function(run_ctest_TimeoutAfterMatch CASE_NAME)
set(CASE_PROPERTY_ARGS "${ARGN}")
run_ctest(${CASE_NAME})
endfunction()
run_ctest_TimeoutAfterMatch(MissingArg1 "\"-Darg2=Test started\"")
run_ctest_TimeoutAfterMatch(MissingArg2 "\"-Darg1=2\"")
run_ctest_TimeoutAfterMatch(ShouldTimeout "\"-Darg1=1\" \"-Darg2=Test started\"")
run_ctest_TimeoutAfterMatch(ShouldPass "\"-Darg1=15\" \"-Darg2=Test started\"")