[Cmake-commits] CMake branch, next, updated. v3.0.0-rc6-3396-g70d34e6

Brad King brad.king at kitware.com
Wed May 28 12:26:12 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  70d34e639bd6d5d90e4afbee507381f07a113a2e (commit)
       via  deee7c42a2df8156ad81c371d0f1007286018f0f (commit)
       via  88b3dcb125db2c3ae64b69d74a9f58b3425012d0 (commit)
      from  f7877d40b9668b374a3c90da8b09351555cc31c6 (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=70d34e639bd6d5d90e4afbee507381f07a113a2e
commit 70d34e639bd6d5d90e4afbee507381f07a113a2e
Merge: f7877d4 deee7c4
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Wed May 28 12:26:11 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed May 28 12:26:11 2014 -0400

    Merge topic 'fix-coverage-py' into next
    
    deee7c42 CTest: Fix Python coverage.py off-by-one error in results
    88b3dcb1 CTest: Improve Python coverage.py source file search algorithm


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=deee7c42a2df8156ad81c371d0f1007286018f0f
commit deee7c42a2df8156ad81c371d0f1007286018f0f
Author:     Zach Mullen <zach.mullen at kitware.com>
AuthorDate: Tue May 27 15:44:46 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 28 12:25:50 2014 -0400

    CTest: Fix Python coverage.py off-by-one error in results
    
    The cobertura format uses line numbers indexed starting at 1, and CTest
    uses a vector indexed starting at 0 to store them.

diff --git a/Source/CTest/cmParsePythonCoverage.cxx b/Source/CTest/cmParsePythonCoverage.cxx
index 68a6817..817b8dc 100644
--- a/Source/CTest/cmParsePythonCoverage.cxx
+++ b/Source/CTest/cmParsePythonCoverage.cxx
@@ -79,11 +79,11 @@ protected:
           curNumber = atoi(atts[tagCount+1]);
         }
 
-        if(curHits > -1 && curNumber > -1)
+        if(curHits > -1 && curNumber > 0)
         {
           FileLinesType& curFileLines =
             this->Coverage.TotalCoverage[this->CurFileName];
-          curFileLines[curNumber] = curHits;
+          curFileLines[curNumber-1] = curHits;
           break;
         }
         ++tagCount;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=88b3dcb125db2c3ae64b69d74a9f58b3425012d0
commit 88b3dcb125db2c3ae64b69d74a9f58b3425012d0
Author:     Roni Choudhury <roni.choudhury at kitware.com>
AuthorDate: Sat May 24 11:42:08 2014 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Wed May 28 12:25:28 2014 -0400

    CTest: Improve Python 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:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list