diff options
author | Zach Mullen <zach.mullen@kitware.com> | 2010-03-19 13:08:57 (GMT) |
---|---|---|
committer | Zach Mullen <zach.mullen@kitware.com> | 2010-03-19 13:09:02 (GMT) |
commit | 4b32ee01f24bdd4f83931c100f3bb2dea2b70414 (patch) | |
tree | f50eafc2887dae6ce2ed5e69e38d845107bdd942 /Source/CTest/cmCTestRunTest.cxx | |
parent | 40cb9c89d7109aa7ca67755cafc4a7da0f91d5a4 (diff) | |
download | CMake-4b32ee01f24bdd4f83931c100f3bb2dea2b70414.zip CMake-4b32ee01f24bdd4f83931c100f3bb2dea2b70414.tar.gz CMake-4b32ee01f24bdd4f83931c100f3bb2dea2b70414.tar.bz2 |
Better detection of stop_time being passed.
Diffstat (limited to 'Source/CTest/cmCTestRunTest.cxx')
-rw-r--r-- | Source/CTest/cmCTestRunTest.cxx | 6 |
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); } //---------------------------------------------------------------------- |