I am specifying a test in my CMakeLists.txt which runs an executable and is supposed to look for a specific output (the PASS_REGULAR_EXPRESSION
) to determine success.
Since the binary doesn't terminate itself, I would also like to terminate the executable after some TIMEOUT
.
The test should pass if my PASS_REGULAR_EXPRESSION
occurs before the TIMEOUT
, otherwise it should fail.
My CMakeLists.txt looks lie:
add_test(NAME sometest COMMAND my_binary)
set_tests_properties(sometest PROPERTIES
PASS_REGULAR_EXPRESSION "All systems go[.]"
TIMEOUT 10)
Unfortunately, having a TIMEOUT
always marks the test as failed. Is it possible to specify a non-failing timeout?