diff options
author | Brad King <brad.king@kitware.com> | 2023-07-25 13:20:59 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-07-25 13:21:11 (GMT) |
commit | 13362ff138a8694ea9129885c9f2a94607a5e8a2 (patch) | |
tree | 133f171c45f70ce6ee978654372223165283fac1 /Source/CTest | |
parent | 58ebb156916c8cc6b3cf2d80385a3633dd544085 (diff) | |
parent | 0e8584c89cdc8114cf2b037ac3d5a76599733ecf (diff) | |
download | CMake-13362ff138a8694ea9129885c9f2a94607a5e8a2.zip CMake-13362ff138a8694ea9129885c9f2a94607a5e8a2.tar.gz CMake-13362ff138a8694ea9129885c9f2a94607a5e8a2.tar.bz2 |
Merge topic 'fix-ctest-timeout-regression'
0e8584c89c CTest: Fix regression in calculating test timeout
Acked-by: Kitware Robot <kwrobot@kitware.com>
Acked-by: buildbot <buildbot@kitware.com>
Merge-request: !8647
Diffstat (limited to 'Source/CTest')
-rw-r--r-- | Source/CTest/cmCTestRunTest.cxx | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx index 9b62183..563439a 100644 --- a/Source/CTest/cmCTestRunTest.cxx +++ b/Source/CTest/cmCTestRunTest.cxx @@ -758,11 +758,13 @@ bool cmCTestRunTest::ForkProcess() } // An explicit TIMEOUT=0 test property means "no timeout". - if (timeout && *timeout == std::chrono::duration<double>::zero()) { - timeout = cm::nullopt; + if (timeout) { + if (*timeout == std::chrono::duration<double>::zero()) { + timeout = cm::nullopt; + } } else { // Check --timeout. - if (!timeout && this->CTest->GetGlobalTimeout() > cmDuration::zero()) { + if (this->CTest->GetGlobalTimeout() > cmDuration::zero()) { timeout = this->CTest->GetGlobalTimeout(); } |