summaryrefslogtreecommitdiffstats
path: root/Source/CTest/cmCTestRunTest.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CTest/cmCTestRunTest.cxx')
-rw-r--r--Source/CTest/cmCTestRunTest.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/CTest/cmCTestRunTest.cxx b/Source/CTest/cmCTestRunTest.cxx
index 13b20de..fe2437d 100644
--- a/Source/CTest/cmCTestRunTest.cxx
+++ b/Source/CTest/cmCTestRunTest.cxx
@@ -570,16 +570,16 @@ double cmCTestRunTest::ResolveTimeout()
stop_time += 24*60*60;
}
int stop_timeout = (stop_time - current_time) % (24*60*60);
+ this->CTest->LastStopTimeout = stop_timeout;
- if(stop_timeout <= 0)
+ if(stop_timeout <= 0 || stop_timeout > this->CTest->LastStopTimeout)
{
cmCTestLog(this->CTest, ERROR_MESSAGE, "The stop time has been passed. "
"Exiting ctest." << std::endl);
exit(-1);
}
-#undef min
return timeout == 0 ? stop_timeout :
- std::min(timeout, static_cast<double>(stop_timeout));
+ (timeout < stop_timeout ? timeout : stop_timeout);
}
//----------------------------------------------------------------------