[Cmake-commits] CMake branch, next, updated. v2.8.7-2225-gc4abb5c

Rolf Eike Beer eike at sf-mail.de
Tue Jan 24 14:23:32 EST 2012


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  c4abb5c845185a7a8c302a891c81d07449cefc37 (commit)
       via  3ea6be30819e78ddf3d97378a519dc50836049a3 (commit)
       via  99180a0bb27eefd6ef8802c8d5c26a2f6e1cec68 (commit)
      from  e9815b3c61ba9c33a886bc677c7ed88f3f0fd933 (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=c4abb5c845185a7a8c302a891c81d07449cefc37
commit c4abb5c845185a7a8c302a891c81d07449cefc37
Merge: e9815b3 3ea6be3
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Tue Jan 24 14:23:25 2012 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Jan 24 14:23:25 2012 -0500

    Merge topic 'ctest-no-coverage-for-empty-lines' into next
    
    3ea6be3 CTest: do not add coverage for empty lines
    99180a0 KWSys Nightly Date Stamp


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3ea6be30819e78ddf3d97378a519dc50836049a3
commit 3ea6be30819e78ddf3d97378a519dc50836049a3
Author:     Rolf Eike Beer <eike at sf-mail.de>
AuthorDate: Tue Jan 24 19:32:31 2012 +0100
Commit:     Rolf Eike Beer <eike at sf-mail.de>
CommitDate: Tue Jan 24 20:11:16 2012 +0100

    CTest: do not add coverage for empty lines
    
    When collecting files using CTEST_EXTRA_COVERAGE_GLOB all lines were added as
    uncovered. This will result in line numbers much higher than any coverage tool
    would give because also comments and the like were taken into account. Since
    filtering them out would need a language aware parser they are left in. But
    completely empty lines could easily be ignored here so the uncovered lines
    don't take them into account anymore.
    
    Some biased numbers: for my coding style this reduced the amount of uncovered
    lines suddenly showing up by ~10%.

diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index 0b1c9fe..130eb6a 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -591,14 +591,24 @@ int cmCTestCoverageHandler::ProcessHandler()
       continue;
       }
     int untested = 0;
+    int lineNr = 0;
     std::string line;
     cmCTestLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
       "Actually performing coverage for: " << i->c_str() << std::endl);
     while (cmSystemTools::GetLineFromStream(ifs, line))
       {
-      covLogFile << "\t\t<Line Number=\"" << untested << "\" Count=\"0\">"
-        << cmXMLSafe(line) << "</Line>" << std::endl;
-      untested ++;
+      covLogFile << "\t\t<Line Number=\"" << lineNr << "\" Count=\"";
+      lineNr ++;
+      if ( line.empty() )
+        {
+        covLogFile << "-1\">";
+        }
+      else
+        {
+        covLogFile << "0\">" << cmXMLSafe(line);
+        untested ++;
+        }
+      covLogFile << "</Line>" << std::endl;
       }
     covLogFile << "\t\t</Report>\n\t</File>" << std::endl;
 

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

Summary of changes:
 Source/CTest/cmCTestCoverageHandler.cxx |   16 +++++++++++++---
 Source/kwsys/kwsysDateStamp.cmake       |    2 +-
 2 files changed, 14 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list