Skip to content

Commit 90352f8

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 d068e6c commit 90352f8

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
@@ -1538,10 +1538,11 @@ if(BUILD_TESTS)
15381538
set(TEST_MONITOR_DEFAULT_TIMEOUT 120)
15391539
endif()
15401540

1541+
# The real timeouts are handled by test-monitor
1542+
set(CTEST_TEST_TIMEOUT 1000)
1543+
15411544
function(configure_test test)
1542-
# The real timeouts are handled by test-monitor
1543-
set_tests_properties(${test}
1544-
PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED" TIMEOUT 1000)
1545+
set_tests_properties(${test} PROPERTIES FAIL_REGULAR_EXPRESSION "FAILED")
15451546
endfunction(configure_test)
15461547

15471548
if(INSTALL_TESTSUITE)

0 commit comments

Comments
 (0)