From 17e94192e67011fadef69466d75a983d600928b7 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Fri, 16 Nov 2007 11:32:38 -0500 Subject: [PATCH] ENH: add support for CDash bullseye coverage --- Source/CTest/cmCTestCoverageHandler.cxx | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 0606cd920c..db1504c033 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" << functionsCalled << "\n" + << "\t\t" + << branchCovered + << "\n" + << "\t\t" + << totalBranches - branchCovered + << "\n" + << "\t\t" + << functionsCalled + << "\n" + << "\t\t" + << totalFunctions - functionsCalled + << "\n" + // Hack for conversion of function to loc assume a function + // has 100 lines of code + << "\t\t" << functionsCalled *100 + << "\n" << "\t\t" - << totalFunctions - functionsCalled << "\n" + << (totalFunctions - functionsCalled)*100 + << "\n" << "\t\t"; covSumFile.setf(std::ios::fixed, std::ios::floatfield); covSumFile.precision(2);