Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 17 additions & 8 deletions bin/genhtml
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ sub append
$record->branchCovCount($key, "age", $ageval));
} elsif ($covType == MCDC_DATA) {
$self->mcdcCovCount($key, "age", $ageval,
$record->branchCovCount($key, "age", $ageval));
$record->mcdcCovCount($key, "age", $ageval));
} else {
$self->functionCovCount($key, 'age', $ageval,
$record->functionCovCount($key, "age", $ageval));
Expand Down Expand Up @@ -4773,7 +4773,7 @@ sub _countMcdcTlaData
$developer = $srcLine->owner();

if (defined($developer)) {
my $shash = $self->[BRANCH_OWNERS];
my $shash = $self->[MCDC_OWNERS];
if (!exists($shash->{$developer})) {
$shash->{$developer} = {};
$shash->{$developer}->{lines} = [];
Expand Down Expand Up @@ -5822,7 +5822,7 @@ sub new
# use 'current' count...
my ($tla, $b_count, $c_count) =
@{$expr->count($sense)};
die("unexpected branch TLA $tla for count $c_count at "
die("unexpected MC/DC TLA $tla for count $c_count at "
. $fileDetails->path()
. ":$line")
unless (
Expand Down Expand Up @@ -11719,8 +11719,17 @@ sub buildOwnerSummaryTable($$$$$$$$$$)
my $first = 1;
# owners are sorted from most uncovered lines to least
foreach my $od (@$ownerList) {
my ($name, $lineData, $branchData) = @$od;
my $d = ($covType == SummaryInfo::LINE_DATA) ? $lineData : $branchData;
my ($name, $lineData, $branchData, $funcData, $mcdcData) = @$od;
my $d;
if ($covType == SummaryInfo::LINE_DATA) {
$d = $lineData;
} elsif ($covType == SummaryInfo::BRANCH_DATA) {
$d = $branchData;
} else {
die("unexpected type '$covType'")
unless ($covType == SummaryInfo::MCDC_DATA);
$d = $mcdcData;
}
my ($missed, $found) = @$d;

# only put user in table if they are responsible for at least one point
Expand Down Expand Up @@ -12337,8 +12346,8 @@ END_OF_HTML
if ($main::show_tla) {
my @tlaRow =
buildHeaderSummaryTableRow($summary, SummaryInfo::MCDC_DATA,
$fileDetail, \&SourceFile::nextBranchTlaGroup,
$tlaSummaryTypes);
$fileDetail, \&SourceFile::nextMcdcTlaGroup,
$tlaSummaryTypes);
push(@dataRow, @tlaRow);
}
push(@row_right, \@dataRow)
Expand Down Expand Up @@ -12457,7 +12466,7 @@ END_OF_HTML
$summary,
SummaryInfo::MCDC_DATA,
$fileDetail,
\&SourceFile::nextBranchInOwnerBin,
\&SourceFile::nextMcdcInOwnerBin,
"MC/DC coverage ownership bins",
$ownerBinDetailPage,
scalar(@dataRow),
Expand Down
5 changes: 2 additions & 3 deletions lib/lcovutil.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1709,7 +1709,7 @@ sub munge_file_patterns
# sadly, substitutions aren't regexps and can't be precompiled
if (@file_subst_patterns) {
verify_regexp_patterns('--substitute', \@file_subst_patterns,
\$lcovutil::case_insensitive);
$lcovutil::case_insensitive);

# keep track of number of times this was applied
@file_subst_patterns = map({ [$_, 0]; } @file_subst_patterns);
Expand Down Expand Up @@ -7558,8 +7558,6 @@ sub _filterFile
return [$traceInfo, $modified];
}
}
# @todo: if MCDC has just one expression, then drop it -
# it is equivalent to branch coverage.
my $region = $cov_filter[$FILTER_EXCLUDE_REGION];
my $branch_region = $cov_filter[$FILTER_EXCLUDE_BRANCH];
my $range = $cov_filter[$lcovutil::FILTER_LINE_RANGE];
Expand Down Expand Up @@ -7818,6 +7816,7 @@ sub _filterFile
next unless $branch && ($branch->totals())[0] == 2;
$mcdc_count->remove($line);
++$mcdc_single->[-2]; # one MC/DC skipped
++$mcdc_single->[-1]; # one coverpoint

$mcdc->remove($line); # remove at top
$modified = 1;
Expand Down