[Cmake-commits] CMake branch, next, updated. v2.8.5-1416-ga8ef9ff

David Cole david.cole at kitware.com
Wed Aug 3 11:04:06 EDT 2011


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  a8ef9fff962c52a5b856c9fdd24c04541d812c1a (commit)
       via  ba4886b717d4c72f4b7c8960862ff44af187d114 (commit)
      from  6d765b7d49fdba2b760c3b9da8e3b771aa735655 (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=a8ef9fff962c52a5b856c9fdd24c04541d812c1a
commit a8ef9fff962c52a5b856c9fdd24c04541d812c1a
Merge: 6d765b7 ba4886b
Author:     David Cole <david.cole at kitware.com>
AuthorDate: Wed Aug 3 11:03:58 2011 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Aug 3 11:03:58 2011 -0400

    Merge topic 'fix-11746-sort-failed-tests-output' into next
    
    ba4886b CTest: print failed tests in index order (#11746)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ba4886b717d4c72f4b7c8960862ff44af187d114
commit ba4886b717d4c72f4b7c8960862ff44af187d114
Author:     David Cole <david.cole at kitware.com>
AuthorDate: Wed Aug 3 10:24:59 2011 -0400
Commit:     David Cole <david.cole at kitware.com>
CommitDate: Wed Aug 3 10:48:43 2011 -0400

    CTest: print failed tests in index order (#11746)
    
    This deterministic ordering makes it easier for a developer
    comparing the ctest output of two test runs to see what changed
    from run to run.
    
    Thanks to Fraser Hutchison for the patch.

diff --git a/Source/CTest/cmCTestTestHandler.cxx b/Source/CTest/cmCTestTestHandler.cxx
index b824e47..078e430 100644
--- a/Source/CTest/cmCTestTestHandler.cxx
+++ b/Source/CTest/cmCTestTestHandler.cxx
@@ -33,6 +33,7 @@
 #include <float.h>
 
 #include <memory> // auto_ptr
+#include <set>
 
 //----------------------------------------------------------------------
 class cmCTestSubdirCommand : public cmCommand
@@ -617,9 +618,12 @@ int cmCTestTestHandler::ProcessHandler()
                  << "The following tests FAILED:" << std::endl);
       this->StartLogFile("TestsFailed", ofs);
 
-      std::vector<cmCTestTestHandler::cmCTestTestResult>::iterator ftit;
-      for(ftit = this->TestResults.begin();
-          ftit != this->TestResults.end(); ++ftit)
+      typedef std::set<cmCTestTestHandler::cmCTestTestResult,
+                       cmCTestTestResultLess> SetOfTests;
+      SetOfTests resultsSet(this->TestResults.begin(), this->TestResults.end());
+
+      for(SetOfTests::iterator ftit = resultsSet.begin();
+          ftit != resultsSet.end(); ++ftit)
         {
         if ( ftit->Status != cmCTestTestHandler::COMPLETED )
           {
diff --git a/Source/CTest/cmCTestTestHandler.h b/Source/CTest/cmCTestTestHandler.h
index 3089d35..8e59e59 100644
--- a/Source/CTest/cmCTestTestHandler.h
+++ b/Source/CTest/cmCTestTestHandler.h
@@ -125,7 +125,16 @@ public:
     cmCTestTestProperties* Properties;
   };
 
-  // add configuraitons to a search path for an executable
+  struct cmCTestTestResultLess
+  {
+    bool operator() (const cmCTestTestResult &lhs,
+                     const cmCTestTestResult &rhs) const
+    {
+    return lhs.TestCount < rhs.TestCount;
+    }
+  };
+
+  // add configurations to a search path for an executable
   static void AddConfigurations(cmCTest *ctest,
                                 std::vector<std::string> &attempted,
                                 std::vector<std::string> &attemptedConfigs,
@@ -141,7 +150,7 @@ public:
 
   typedef std::vector<cmCTestTestProperties> ListOfTests;
 protected:
-  // comput a final test list
+  // compute a final test list
   virtual int PreProcessHandler();
   virtual int PostProcessHandler();
   virtual void GenerateTestCommand(std::vector<std::string>& args);

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

Summary of changes:
 Source/CTest/cmCTestTestHandler.cxx |   10 +++++++---
 Source/CTest/cmCTestTestHandler.h   |   13 +++++++++++--
 2 files changed, 18 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list