Skip to content

Commit 165026e

Browse files
committed
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 5a7d3dd commit 165026e

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
@@ -1542,10 +1542,11 @@ if(BUILD_TESTS)
15421542
set(TEST_MONITOR_DEFAULT_TIMEOUT 120)
15431543
endif()
15441544

1545+
# The real timeouts are handled by test-monitor
1546+
set(CTEST_TEST_TIMEOUT 1000)
1547+
15451548
function(configure_test test)
1546-
# The real timeouts are handled by test-monitor
1547-
set_tests_properties(${test}
1548-
PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT 1000)
1549+
set_tests_properties(${test} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED")
15491550
endfunction(configure_test)
15501551

15511552
if(INSTALL_TESTSUITE)

0 commit comments

Comments
 (0)