|
@@ -1215,8 +1215,6 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|
|
while (cmSystemTools::GetLineFromStream(ifile, nl)) {
|
|
while (cmSystemTools::GetLineFromStream(ifile, nl)) {
|
|
|
cnt++;
|
|
cnt++;
|
|
|
|
|
|
|
|
- // TODO: Handle gcov 3.0 non-coverage lines
|
|
|
|
|
-
|
|
|
|
|
// Skip empty lines
|
|
// Skip empty lines
|
|
|
if (nl.empty()) {
|
|
if (nl.empty()) {
|
|
|
continue;
|
|
continue;
|
|
@@ -1227,6 +1225,14 @@ int cmCTestCoverageHandler::HandleGCovCoverage(
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ // Handle gcov 3.0 non-coverage lines
|
|
|
|
|
+ // non-coverage lines seem to always start with something not
|
|
|
|
|
+ // a space and don't have a ':' in the 9th position
|
|
|
|
|
+ // TODO: Verify that this is actually a robust metric
|
|
|
|
|
+ if (nl[0] != ' ' && nl[9] != ':') {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
// Read the coverage count from the beginning of the gcov output
|
|
// Read the coverage count from the beginning of the gcov output
|
|
|
// line
|
|
// line
|
|
|
std::string prefix = nl.substr(0, 12);
|
|
std::string prefix = nl.substr(0, 12);
|