[Cmake-commits] CMake branch, next, updated. v2.8.10.2-2951-g693aaa3

Rolf Eike Beer eike at sf-mail.de
Fri May 10 14:59:46 EDT 2013


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, next has been updated
       via  693aaa34e087c20eb2dd6cdb3e9b8a13eb666e32 (commit)
       via  e319e32b8c30d255ceea3ed1e133a7303aea9681 (commit)
      from  ae431450179eb5529790183893ea3870c9a95798 (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=693aaa34e087c20eb2dd6cdb3e9b8a13eb666e32
commit 693aaa34e087c20eb2dd6cdb3e9b8a13eb666e32
Merge: ae43145 e319e32
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Fri May 10 14:59:43 2013 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri May 10 14:59:43 2013 -0400

    Merge topic 'positive-test-times' into next
    
    e319e32 CTest: make sure never to report negative test times (#14132)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e319e32b8c30d255ceea3ed1e133a7303aea9681
commit e319e32b8c30d255ceea3ed1e133a7303aea9681
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Fri May 10 20:50:22 2013 +0200
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Fri May 10 20:50:22 2013 +0200

    CTest: make sure never to report negative test times (#14132)
    
    Because of clock scew between processors or just because of someone changing
    the system time the end timestamp may be before the start time. Reporting a
    negative time doesn't any sense, just report zero there as it already happens
    for really fast tests.

diff --git a/Source/CTest/cmProcess.cxx b/Source/CTest/cmProcess.cxx
index 000bc85..167b992 100644
--- a/Source/CTest/cmProcess.cxx
+++ b/Source/CTest/cmProcess.cxx
@@ -175,6 +175,14 @@ int cmProcess::GetNextOutputLine(std::string& line, double timeout)
   // Record exit information.
   this->ExitValue = cmsysProcess_GetExitValue(this->Process);
   this->TotalTime = cmSystemTools::GetTime() - this->StartTime;
+  // Because of a processor clock scew the runtime may become slightly
+  // negative. If someone changed the system clock while the process was
+  // running this may be even more. Make sure not to report a negative
+  // duration here.
+  if (this->TotalTime <= 0.0)
+    {
+    this->TotalTime = 0.0;
+    }
   //  std::cerr << "Time to run: " << this->TotalTime << "\n";
   return cmsysProcess_Pipe_None;
 }

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

Summary of changes:
 Source/CTest/cmProcess.cxx |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list