[Cmake-commits] CMake branch, master, updated. 4b32ee01f24bdd4f83931c100f3bb2dea2b70414

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Mar 19 09:09:58 EDT 2010


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, master has been updated
       via  4b32ee01f24bdd4f83931c100f3bb2dea2b70414 (commit)
      from  40cb9c89d7109aa7ca67755cafc4a7da0f91d5a4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4b32ee01f24bdd4f83931c100f3bb2dea2b70414
commit 4b32ee01f24bdd4f83931c100f3bb2dea2b70414
Author: Zach Mullen <zach.mullen at kitware.com>
Date:   Fri Mar 19 09:08:57 2010 -0400

    Better detection of stop_time being passed.

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;

-----------------------------------------------------------------------

Summary of changes:
 Source/CTest/cmCTestRunTest.cxx |    6 +++---
 Source/cmCTest.cxx              |    3 ++-
 Source/cmCTest.h                |    2 ++
 3 files changed, 7 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list