summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-05-04 16:25:48 -0400
committerBrad King <brad.king@kitware.com>2023-05-04 16:58:03 -0400
commit3edf7fbb418d0da1e1ef1717b35b828d2003c427 (patch)
tree707f2c8f71310caec7cc3e7c43f2c31791c7c574 /Source
parent39a20a56ddcde1eecd44b32ab0610b579a7ac4eb (diff)
downloadcmake-3edf7fbb418d0da1e1ef1717b35b828d2003c427.tar.gz
ctest: Fix TIMEOUT test property with value 0 with --timeout flag
An explicit zero TIMEOUT test property value should not be overridden by the `--timeout` flag.
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestTestHandler.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index bfc6bd6b75..cd92e0ab09 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -1379,7 +1379,7 @@ bool cmCTestTestHandler::ProcessDirectory(std::vector<std::string>& passed,
p.Cost = static_cast<float>(rand());
}
- if (p.Timeout == cmDuration::zero() &&
+ if (p.Timeout == cmDuration::zero() && !p.ExplicitTimeout &&
this->CTest->GetGlobalTimeout() != cmDuration::zero()) {
p.Timeout = this->CTest->GetGlobalTimeout();
}