summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-11-16 16:32:38 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2007-11-16 16:32:38 (GMT)
commit17e94192e67011fadef69466d75a983d600928b7 (patch)
tree0ae76e67728833353cb70a9d85b10ee67023bc3d /Source
parentbb1fa4c3f0cdbc625b2bbc04b6f88788f6ccf49f (diff)
downloadCMake-17e94192e67011fadef69466d75a983d600928b7.zip
CMake-17e94192e67011fadef69466d75a983d600928b7.tar.gz
CMake-17e94192e67011fadef69466d75a983d600928b7.tar.bz2
ENH: add support for CDash bullseye coverage
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestCoverageHandler.cxx24
1 files changed, 18 insertions, 6 deletions
diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx
index 0606cd9..db1504c 100644
--- a/Source/CTest/cmCTestCoverageHandler.cxx
+++ b/Source/CTest/cmCTestCoverageHandler.cxx
@@ -1510,10 +1510,6 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
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 @@ int cmCTestCoverageHandler::RunBullseyeSourceSummary(
<< "\" 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);