[Cmake-commits] CMake branch, master, updated. v3.10.0-569-g5104553
Kitware Robot
kwrobot at kitware.com
Thu Dec 7 10:55:11 EST 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, master has been updated
via 51045535e8e7add1f53d3599cdee2cf0f50c16f8 (commit)
via be4702781d5bfe092daa2f6bfa1012c047e2161a (commit)
from e016d6d255f36cc17e85e27761fd01ef048a1b93 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=51045535e8e7add1f53d3599cdee2cf0f50c16f8
commit 51045535e8e7add1f53d3599cdee2cf0f50c16f8
Merge: e016d6d be47027
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Dec 7 15:45:39 2017 +0000
Commit: Kitware Robot <kwrobot at kitware.com>
CommitDate: Thu Dec 7 10:45:47 2017 -0500
Merge topic 'fix-ctest-chrono'
be470278 CTest: Fix regression in test timeout compuatation
Acked-by: Kitware Robot <kwrobot at kitware.com>
Acked-by: dublet <github at dublet.org>
Merge-request: !1568
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=be4702781d5bfe092daa2f6bfa1012c047e2161a
commit be4702781d5bfe092daa2f6bfa1012c047e2161a
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Dec 7 07:14:38 2017 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Thu Dec 7 08:33:19 2017 -0500
CTest: Fix regression in test timeout compuatation
Refactoring in commit 66419bc046 (CTest: convert timeouts to
std::chrono::duration, 2017-11-20) accidentally changed the logic used
to compute the timeout for a test when it starts. It incorrectly limits
the maximum possible timeout to 2 minutes rather than 2 minutes less
than the total allowed test time remaining. Update the new logic to
restore the original behavior.
Avoid subtracting 2 minutes from our "infinite" timeout value to avoid
creating very large timeouts that are not "infinite" and may exceed
integer type ranges.
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index 830ebdf..a075649 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>
@@ -686,8 +685,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();
-----------------------------------------------------------------------
Summary of changes:
Source/CTest/cmCTestRunTest.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list