[Cmake-commits] CMake branch, next, updated. v3.0.0-rc6-3371-g9d2d4b9

Brad King brad.king at kitware.com
Tue May 27 10:21:16 EDT 2014


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  9d2d4b9c55d67418b9cb90e77af265f7d5f627ea (commit)
       via  b9beed9428cc493cae595ea3acf354ce528b67e4 (commit)
      from  d4e8422435cdc05f3c2dd08878f8513ba7cf01c6 (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=9d2d4b9c55d67418b9cb90e77af265f7d5f627ea
commit 9d2d4b9c55d67418b9cb90e77af265f7d5f627ea
Merge: d4e8422 b9beed9
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Tue May 27 10:21:16 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue May 27 10:21:16 2014 -0400

    Merge topic 'fix-coverage-py' into next
    
    b9beed94 Improvement to coverage.py source file search algorithm


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b9beed9428cc493cae595ea3acf354ce528b67e4
commit b9beed9428cc493cae595ea3acf354ce528b67e4
Author:     Roni Choudhury <roni.choudhury at kitware.com>
AuthorDate: Sat May 24 11:42:08 2014 -0400
Commit:     Roni Choudhury <roni.choudhury at kitware.com>
CommitDate: Sat May 24 11:42:08 2014 -0400

    Improvement to coverage.py source file search algorithm
    
    If the coverage.py source file is not found in the source directory, the build
    directory is first searched before raising an error.
    
    This is necessary because it is a valid workflow to build a Python package from
    source, then install this package to a virtualenv that lives in the build
    directory.  Tests will run against this deployed package and therefore the
    covered source files will be found in a subdirectory of the build directory, and
    not anywhere in the source directory.

diff --git a/Source/CTest/cmParsePythonCoverage.cxx b/Source/CTest/cmParsePythonCoverage.cxx
index 2578bb8..68a6817 100644
--- a/Source/CTest/cmParsePythonCoverage.cxx
+++ b/Source/CTest/cmParsePythonCoverage.cxx
@@ -33,19 +33,25 @@ protected:
                      << atts[tagCount+1] << std::endl);
           this->CurFileName = this->Coverage.SourceDir + "/" +
                                  atts[tagCount+1];
-          FileLinesType& curFileLines =
-            this->Coverage.TotalCoverage[this->CurFileName];
           cmsys::ifstream fin(this->CurFileName.c_str());
           if(!fin)
           {
-            cmCTestLog(this->CTest, ERROR_MESSAGE,
-                       "Python Coverage: Error opening " << this->CurFileName
-                       << std::endl);
-            this->Coverage.Error++;
-            break;
+            this->CurFileName = this->Coverage.BinaryDir + "/" +
+                                   atts[tagCount+1];
+            fin.open(this->CurFileName.c_str());
+            if (!fin)
+            {
+              cmCTestLog(this->CTest, ERROR_MESSAGE,
+                         "Python Coverage: Error opening " << this->CurFileName
+                         << std::endl);
+              this->Coverage.Error++;
+              break;
+            }
           }
 
           std::string line;
+          FileLinesType& curFileLines =
+            this->Coverage.TotalCoverage[this->CurFileName];
           curFileLines.push_back(-1);
           while(cmSystemTools::GetLineFromStream(fin, line))
           {

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

Summary of changes:
 Source/CTest/cmParsePythonCoverage.cxx |   20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list