summaryrefslogtreecommitdiffstats
path: root/Source/CTest
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-12-07 15:45:39 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-12-07 15:45:47 (GMT)
commit51045535e8e7add1f53d3599cdee2cf0f50c16f8 (patch)
treecaf4c23d55d16c7e99979ec24e36212ae050059a /Source/CTest
parente016d6d255f36cc17e85e27761fd01ef048a1b93 (diff)
parentbe4702781d5bfe092daa2f6bfa1012c047e2161a (diff)
downloadCMake-51045535e8e7add1f53d3599cdee2cf0f50c16f8.zip
CMake-51045535e8e7add1f53d3599cdee2cf0f50c16f8.tar.gz
CMake-51045535e8e7add1f53d3599cdee2cf0f50c16f8.tar.bz2
Merge topic 'fix-ctest-chrono'
be470278 CTest: Fix regression in test timeout compuatation Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: dublet <github@dublet.org> Merge-request: !1568
Diffstat (limited to 'Source/CTest')
-rw-r--r--Source/CTest/cmCTestRunTest.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index a056f4b..7013db3 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -18,7 +18,6 @@
#include "cmsys/Base64.h"
#include "cmsys/Process.h"
#include "cmsys/RegularExpression.hxx"
-#include <algorithm>
#include <chrono>
#include <iomanip>
#include <sstream>
@@ -690,8 +689,10 @@ bool cmCTestRunTest::ForkProcess(std::chrono::duration<double> testTimeOut,
// determine how much time we have
std::chrono::duration<double> timeout =
- std::min<std::chrono::duration<double>>(
- this->CTest->GetRemainingTimeAllowed(), std::chrono::minutes(2));
+ this->CTest->GetRemainingTimeAllowed();
+ if (timeout != std::chrono::duration<double>::max()) {
+ timeout -= std::chrono::minutes(2);
+ }
if (this->CTest->GetTimeOut() > std::chrono::duration<double>::zero() &&
this->CTest->GetTimeOut() < timeout) {
timeout = this->CTest->GetTimeOut();