summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/cmCTest.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 8158257..6c1d3bd 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -1095,10 +1095,12 @@ int cmCTest::RunTest(std::vector<const char*> argv,
{
timeout = this->TimeOut;
}
- if (testTimeOut && testTimeOut < timeout)
+ if (testTimeOut
+ && testTimeOut < this->GetRemainingTimeAllowed())
{
timeout = testTimeOut;
}
+
// always have at least 1 second if we got to here
if (timeout <= 0)
{