[Cmake-commits] CMake branch, next, updated. v3.5.0-rc3-291-gca566cd

Joe Snyder joe.snyder at kitware.com
Thu Feb 25 13:14:09 EST 2016


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  ca566cd242b363f43e313ab9cd16f9521db8fc7b (commit)
       via  bc29ed542bbe8ff6b0bc178a7940a166680e002e (commit)
      from  dd6870d0dab8ede1a2861016f052897f26541919 (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 -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ca566cd242b363f43e313ab9cd16f9521db8fc7b
commit ca566cd242b363f43e313ab9cd16f9521db8fc7b
Merge: dd6870d bc29ed5
Author:     Joe Snyder <joe.snyder at kitware.com>
AuthorDate: Thu Feb 25 13:14:08 2016 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Feb 25 13:14:08 2016 -0500

    Merge topic 'fix_coverage_file_searching' into next
    
    bc29ed54 CTest: Make coverage file selection more specific.


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=bc29ed542bbe8ff6b0bc178a7940a166680e002e
commit bc29ed542bbe8ff6b0bc178a7940a166680e002e
Author:     Joseph Snyder <joe.snyder at kitware.com>
AuthorDate: Wed Nov 18 13:01:22 2015 -0500
Commit:     Joseph Snyder <joe.snyder at kitware.com>
CommitDate: Thu Feb 25 13:01:37 2016 -0500

    CTest: Make coverage file selection more specific.
    
    When performing some other testing, the globs for Blanket.js and Delphi
    code coverage are picking up unintended files.  Change the query for the
    Delphi coverage to follow the naming convention, and check the second line
    of the found JSON files for certain text before parsing them as coverage files.

diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index 2c2cd48..fd62696 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -983,7 +983,7 @@ int cmCTestCoverageHandler::HandleDelphiCoverage(
 
   std::string BinDir
     = this->CTest->GetBinaryDir();
-  std::string coverageFile = BinDir+ "/*.html";
+  std::string coverageFile = BinDir+ "/*(*.pas).html";
 
 
   g.FindFiles(coverageFile);
@@ -1017,9 +1017,25 @@ int cmCTestCoverageHandler::HandleBlanketJSCoverage(
   std::string coverageFile = SourceDir+ "/*.json";
   cmsys::Glob g;
   std::vector<std::string> files;
+  std::vector<std::string> blanketFiles;
   g.FindFiles(coverageFile);
   files=g.GetFiles();
-  if (!files.empty())
+  // Ensure that the JSON files found are the result of the
+  // Blanket.js output. Check for the "node-jscoverage"
+  // string on the second line
+  std::string line;
+  for(unsigned int fileEntry=0;fileEntry<files.size();fileEntry++)
+    {
+    cmsys::ifstream in(files[fileEntry].c_str());
+    cmSystemTools::GetLineFromStream(in, line);
+    cmSystemTools::GetLineFromStream(in, line);
+    if (line.find("node-jscoverage") != line.npos)
+      {
+      blanketFiles.push_back(files[fileEntry]);
+      }
+    }
+  //  Take all files with the node-jscoverage string and parse those
+  if (!blanketFiles.empty())
     {
     cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
       "Found BlanketJS output JSON, Performing Coverage" << std::endl,

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

Summary of changes:
 Source/CTest/cmCTestCoverageHandler.cxx |   20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list