[cmake-commits] hoffman committed cmCTestCoverageHandler.cxx 1.49 1.50

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Nov 16 11:32:40 EST 2007


Update of /cvsroot/CMake/CMake/Source/CTest
In directory public:/mounts/ram/cvs-serv8002

Modified Files:
	cmCTestCoverageHandler.cxx 
Log Message:
ENH: add support for CDash bullseye coverage


Index: cmCTestCoverageHandler.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CTest/cmCTestCoverageHandler.cxx,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- cmCTestCoverageHandler.cxx	5 Nov 2007 19:34:36 -0000	1.49
+++ cmCTestCoverageHandler.cxx	16 Nov 2007 16:32:38 -0000	1.50
@@ -1510,10 +1510,6 @@
         cmet /= 2.0f;
         }
       cmet /= 100.0f;
-      // Hack for conversion of function to loc assume a function
-      // has 100 lines of code
-      functionsCalled *=100;
-      totalFunctions *=100;
       tmpLog << stdline.c_str() << "\n";
       tmpLog << fileName << "\n";
       tmpLog << "functionsCalled: " << functionsCalled/100 << "\n";
@@ -1528,9 +1524,25 @@
                  << "\" FullPath=\"" << this->CTest->MakeXMLSafe(
                    this->CTest->GetShortPathToFile(file.c_str()))
                  << "\" Covered=\"" << (cmet>0?"true":"false") << "\">\n"
-                 << "\t\t<LOCTested>" << functionsCalled << "</LOCTested>\n"
+                 << "\t\t<BranchesTested>"
+                 << branchCovered
+                 << "</BranchesTested>\n"
+                 << "\t\t<BranchesUnTested>" 
+                 << totalBranches - branchCovered
+                 << "</BranchesUnTested>\n"
+                 << "\t\t<FunctionsTested>"
+                 << functionsCalled
+                 << "</FunctionsTested>\n"
+                 << "\t\t<FunctionsUnTested>" 
+                 << totalFunctions - functionsCalled
+                 << "</FunctionsUnTested>\n"
+        // Hack for conversion of function to loc assume a function
+        // has 100 lines of code
+                 << "\t\t<LOCTested>" << functionsCalled *100
+                 << "</LOCTested>\n"
                  << "\t\t<LOCUnTested>" 
-                 << totalFunctions - functionsCalled << "</LOCUnTested>\n"
+                 << (totalFunctions - functionsCalled)*100
+                 << "</LOCUnTested>\n"
                  << "\t\t<PercentCoverage>";
       covSumFile.setf(std::ios::fixed, std::ios::floatfield);
       covSumFile.precision(2);



More information about the Cmake-commits mailing list