Skip to content

Commit

Permalink
bugfix: dgcov.pl shows wrong line numbers
Browse files Browse the repository at this point in the history
dgcov.pl was putting gcov execution counters on wrong lines
in the report (*.dgcov files were correct), because it was
incrementing the new line number for diff lines starting from '-'
(lines from the old file, not present in the new)
  • Loading branch information
vuvova committed May 5, 2024
1 parent 4f5dea4 commit 179515a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions mysql-test/dgcov.pl
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ sub print_gcov_for_diff {
$acc.=sprintf '%9s:%5s:%s', '', $lnum, $' if /^ /;
++$printme, $acc.=sprintf '%9s:%5s:%s', gcov_prefix($fcov->{$lnum}), $lnum, $' if /^\+/;
die "$_^^^ dying", unless /^[- +]/;
++$lnum;
--$cnt;
++$lnum, --$cnt unless /^-/;
}
print $acc if $printme;
close PIPE or die "command '$cmd' failed: $!: $?";
Expand Down

0 comments on commit 179515a

Please sign in to comment.