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  2acc0abc0c34ab7ca49777c8e64ed455c48e8ce2 (commit)
       via  6f530c8dfbc217cf83b6e27e5c312b4661b2c8fb (commit)
      from  48c73f5a01e840039b18d79adc788708d19ffb56 (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=2acc0abc0c34ab7ca49777c8e64ed455c48e8ce2
commit 2acc0abc0c34ab7ca49777c8e64ed455c48e8ce2
Merge: 48c73f5 6f530c8
Author:     Zack Galbreath <zack.galbre...@kitware.com>
AuthorDate: Fri Nov 13 09:36:58 2015 -0500
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Fri Nov 13 09:36:58 2015 -0500

    Merge topic 'jacoco_out_of_source' into next
    
    6f530c8d Search for Jacoco files in the binary directory


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6f530c8dfbc217cf83b6e27e5c312b4661b2c8fb
commit 6f530c8dfbc217cf83b6e27e5c312b4661b2c8fb
Author:     Zack Galbreath <zack.galbre...@kitware.com>
AuthorDate: Thu Oct 29 16:08:10 2015 -0400
Commit:     Zack Galbreath <zack.galbre...@kitware.com>
CommitDate: Thu Oct 29 16:08:10 2015 -0400

    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:
 Source/CTest/cmCTestCoverageHandler.cxx |   25 +++++++++++++++++++++----
 1 file changed, 21 insertions(+), 4 deletions(-)


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to