diff options
Diffstat (limited to 'Source/cmCTest.cxx')
-rw-r--r-- | Source/cmCTest.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index a4ca301..2cd60e5 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1089,9 +1089,10 @@ int cmCTest::RunTest(std::vector<const char*> argv, std::string* output, bool modifyEnv = (environment && !environment->empty()); // determine how much time we have - std::chrono::duration<double> timeout = - std::min<std::chrono::duration<double>>(this->GetRemainingTimeAllowed(), - std::chrono::minutes(2)); + std::chrono::duration<double> timeout = this->GetRemainingTimeAllowed(); + if (timeout != std::chrono::duration<double>::max()) { + timeout -= std::chrono::minutes(2); + } if (this->TimeOut > std::chrono::duration<double>::zero() && this->TimeOut < timeout) { timeout = this->TimeOut; |