diff options
author | Brad King <brad.king@kitware.com> | 2023-05-03 10:29:05 -0400 |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2023-05-04 16:58:03 -0400 |
commit | 39a20a56ddcde1eecd44b32ab0610b579a7ac4eb (patch) | |
tree | 7d6c24f1bb4afe447c121697752d22e8c4a35bb1 /Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake | |
parent | cd4038fe94caa6f9a18291081a6e8801b91a2368 (diff) | |
download | cmake-39a20a56ddcde1eecd44b32ab0610b579a7ac4eb.tar.gz |
Tests: Move `CTestTestZeroTimeout` into `RunCMake.CTestTimeout`
Diffstat (limited to 'Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake b/Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake index 7e96b6da57..e55ba27637 100644 --- a/Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake +++ b/Tests/RunCMake/CTestTimeout/RunCMakeTest.cmake @@ -1,6 +1,6 @@ include(RunCTest) -if(NOT TIMEOUT) +if(NOT DEFINED TIMEOUT) # Give the process time to load and start running. set(TIMEOUT 4) endif() @@ -20,3 +20,13 @@ if(UNIX) run_ctest_timeout(Fork) unset(CASE_CMAKELISTS_SUFFIX_CODE) endif() + +block() + # An explicit zero TIMEOUT test property means "no timeout". + set(TIMEOUT 0) + # The test sleeps for 4 seconds longer than the TIMEOUT value. + # Set a default timeout to less than that so that the test will + # timeout if the zero TIMEOUT does not suppress it. + set(CASE_TEST_PREFIX_CODE "set(CTEST_TEST_TIMEOUT 2)") + run_ctest_timeout(ZeroOverridesVar) +endblock() |