[Cmake-commits] CMake branch, next, updated. v3.4.0-1375-g4a67aba

Brad King brad.king at kitware.com
Mon Nov 16 09:18:02 EST 2015


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  4a67aba1018f6f5e203cb02a32040145951077d8 (commit)
       via  1db32ffe98272ded29827b833f373ffa399429e9 (commit)
      from  eb7ca13c574c9fbf5863adf3904a9f207e4b4d20 (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=4a67aba1018f6f5e203cb02a32040145951077d8
commit 4a67aba1018f6f5e203cb02a32040145951077d8
Merge: eb7ca13 1db32ff
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Mon Nov 16 09:18:02 2015 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Nov 16 09:18:02 2015 -0500

    Merge topic 'jacoco_out_of_source' into next
    
    1db32ffe ctest_coverage: Search for Jacoco files in the binary directory


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1db32ffe98272ded29827b833f373ffa399429e9
commit 1db32ffe98272ded29827b833f373ffa399429e9
Author:     Zack Galbreath <zack.galbreath at kitware.com>
AuthorDate: Thu Oct 29 16:08:10 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Mon Nov 16 09:08:42 2015 -0500

    ctest_coverage: Search for Jacoco files in the binary directory
    
    Search for Jacoco coverage files in both the source directory
    and the binary directory.

diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index 20807c8..d358a93 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -913,16 +913,33 @@ int cmCTestCoverageHandler::HandleJacocoCoverage(
 {
   cmParseJacocoCoverage cov =
    cmParseJacocoCoverage(*cont, this->CTest);
-  cmsys::Glob g;
+
+  // Search in the source directory.
+  cmsys::Glob g1;
   std::vector<std::string> files;
-  g.SetRecurse(true);
+  g1.SetRecurse(true);
 
   std::string SourceDir
     = this->CTest->GetCTestConfiguration("SourceDirectory");
   std::string coverageFile = SourceDir+ "/*jacoco.xml";
 
-  g.FindFiles(coverageFile);
-  files=g.GetFiles();
+  g1.FindFiles(coverageFile);
+  files = g1.GetFiles();
+
+  // ...and in the binary directory.
+  cmsys::Glob g2;
+  std::vector<std::string> binFiles;
+  g2.SetRecurse(true);
+  std::string binaryDir
+    = this->CTest->GetCTestConfiguration("BuildDirectory");
+  std::string binCoverageFile = binaryDir+ "/*jacoco.xml";
+  g2.FindFiles(binCoverageFile);
+  binFiles = g2.GetFiles();
+  if (!binFiles.empty())
+    {
+    files.insert(files.end(), binFiles.begin(), binFiles.end());
+    }
+
   if (!files.empty())
     {
     cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list