From 687a26b7023748cc98317eae53ee2ac3cc520bda Mon Sep 17 00:00:00 2001 From: Brad King Date: Fri, 8 Dec 2017 07:33:39 -0500 Subject: [PATCH] CTest: Fix regression in build-and-test timeout forwarding Refactoring in commit 66419bc046 (CTest: convert timeouts to std::chrono::duration, 2017-11-20) changed out "infinite" timeout to a value not representable by a 64-bit integer. Update the `--build-and-test` forwarding of `--test-timeout` to not forward an "infinite" timeout. --- Source/cmCTest.cxx | 1 + 1 file changed, 1 insertion(+) diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx index 2cd60e5b88..ed45644ff3 100644 --- a/Source/cmCTest.cxx +++ b/Source/cmCTest.cxx @@ -1131,6 +1131,7 @@ int cmCTest::RunTest(std::vector argv, std::string* output, // invocations. Since --build-generator is required this is a // good place to check for it, and to add the arguments in if (strcmp(i, "--build-generator") == 0 && + timeout != std::chrono::duration::max() && timeout > std::chrono::duration::zero()) { args.push_back("--test-timeout"); std::ostringstream msg;