Skip to content

Commit 92d37f3

Browse files
Bob131rocallahan
authored andcommitted
build: make test timeout configurable
The CMake test property TIMEOUT has higher priority than the user-supplied --timeout switch. The exceptionally long default setting (1000 seconds) can make tests that aren't entirely controlled by test-monitor very painful to run. This commit instead sets CTEST_TEST_TIMEOUT, allowing the user to override the timeout at test run time.
1 parent 4857fd6 commit 92d37f3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

CMakeLists.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1566,10 +1566,11 @@ if(BUILD_TESTS)
15661566
set(TEST_MONITOR_DEFAULT_TIMEOUT 120)
15671567
endif()
15681568

1569+
# The real timeouts are handled by test-monitor
1570+
set(CTEST_TEST_TIMEOUT 1000)
1571+
15691572
function(configure_test test)
1570-
# The real timeouts are handled by test-monitor
1571-
set_tests_properties(${test}
1572-
PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT 1000)
1573+
set_tests_properties(${test} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED")
15731574
endfunction(configure_test)
15741575

15751576
if(INSTALL_TESTSUITE)

0 commit comments

Comments
 (0)