summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-07-25 13:20:59 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-07-25 13:21:11 (GMT)
commit13362ff138a8694ea9129885c9f2a94607a5e8a2 (patch)
tree133f171c45f70ce6ee978654372223165283fac1 /Source/CTest
parent58ebb156916c8cc6b3cf2d80385a3633dd544085 (diff)
parent0e8584c89cdc8114cf2b037ac3d5a76599733ecf (diff)
downloadCMake-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.cxx8
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();
}