summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorZach Mullen <zach.mullen@kitware.com>2010-03-19 13:08:57 (GMT)
committerZach Mullen <zach.mullen@kitware.com>2010-03-19 13:09:02 (GMT)
commit4b32ee01f24bdd4f83931c100f3bb2dea2b70414 (patch)
treef50eafc2887dae6ce2ed5e69e38d845107bdd942 /Source
parent40cb9c89d7109aa7ca67755cafc4a7da0f91d5a4 (diff)
downloadCMake-4b32ee01f24bdd4f83931c100f3bb2dea2b70414.zip
CMake-4b32ee01f24bdd4f83931c100f3bb2dea2b70414.tar.gz
CMake-4b32ee01f24bdd4f83931c100f3bb2dea2b70414.tar.bz2
Better detection of stop_time being passed.
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestRunTest.cxx6
-rw-r--r--Source/cmCTest.cxx3
-rw-r--r--Source/cmCTest.h2
3 files changed, 7 insertions, 4 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);
}
//----------------------------------------------------------------------
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 9ab881c..bd69d6c 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -311,6 +311,7 @@ cmCTest::cmCTest()
this->InteractiveDebugMode = true;
this->TimeOut = 0;
this->GlobalTimeout = 0;
+ this->LastStopTimeout = 24 * 60 * 60;
this->CompressXMLFiles = false;
this->CTestConfigFile = "";
this->ScheduleType = "";
@@ -2580,7 +2581,7 @@ void cmCTest::DetermineNextDayStop()
lctime->tm_mon + 1,
lctime->tm_mday,
this->StopTime.c_str(),
- timezone);
+ tzone_offset);
time_t stop_time = curl_getdate(buf, &current_time);
diff --git a/Source/cmCTest.h b/Source/cmCTest.h
index 4b66985..3d7d117 100644
--- a/Source/cmCTest.h
+++ b/Source/cmCTest.h
@@ -457,6 +457,8 @@ private:
double GlobalTimeout;
+ int LastStopTimeout;
+
int MaxTestNameWidth;
int ParallelLevel;