This is an automated email from the git hooks/post-receive script. guillem pushed a commit to branch main in repository dpkg.
View the commit online: https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=94e57741131f0f7bb30df5e93cfb19cb5f4e1024 commit 94e57741131f0f7bb30df5e93cfb19cb5f4e1024 (HEAD -> main) Author: Guillem Jover <[email protected]> AuthorDate: Wed Jul 17 02:16:07 2024 +0200 build: Update lcov usage for version 2.0 Update configuration options. Adapt lcov-inject for new HTML output. Remove system header removal, no longer needed. --- Makefile.am | 4 +--- build-aux/lcov-inject | 13 +++++++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Makefile.am b/Makefile.am index 97f4c2bd4..74f8df197 100644 --- a/Makefile.am +++ b/Makefile.am @@ -124,7 +124,7 @@ doc-clean: .PHONY: coverage coverage-clean if COVERAGE_ENABLED -LCOV_OPTS = --quiet --rc geninfo_checksum=1 --rc lcov_branch_coverage=1 +LCOV_OPTS = --quiet --rc checksum=1 --rc branch_coverage=1 LCOV_CAPTURE_OPTS = $(LCOV_OPTS) --no-recursion \ --directory $(top_builddir)/lib/dpkg \ --directory $(top_builddir)/src/common \ @@ -157,8 +157,6 @@ coverage: all $(LCOV) $(LCOV_OPTS) \ --add-tracefile dpkg_base.lcov \ --add-tracefile dpkg_test.lcov \ - --output-file dpkg_merge.lcov - $(LCOV) $(LCOV_OPTS) --remove dpkg_merge.lcov '/usr/include/*' \ --output-file dpkg.lcov : # Generate reports $(LCOV) $(LCOV_OPTS) --list dpkg.lcov diff --git a/build-aux/lcov-inject b/build-aux/lcov-inject index 9dd589696..98e9532cd 100755 --- a/build-aux/lcov-inject +++ b/build-aux/lcov-inject @@ -2,7 +2,7 @@ # # lcov-inject # -# Copyright © 2014 Guillem Jover <[email protected]> +# Copyright © 2014-2024 Guillem Jover <[email protected]> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -38,7 +38,7 @@ chdir $cwd or die "cannot switch to $cwd\n"; my $s = $db->{summary}{Total}; my $tmpl = sprintf ' - <td class="coverFile"><a href="%s">%s</a></td> + <td class="coverDirectory"><a href="%s">%s</a></td> <td class="coverBar" align="center"> <table border=0 cellspacing=0 cellpadding=1> <tr><td class="coverBarOutline">%s</td></tr> @@ -50,10 +50,10 @@ my $tmpl = sprintf ' </tr> <tr> ', "$dir/coverage.html", $dir, bar_html($s->{total}{percentage}), - box_html($s->{total}), box_html($s->{subroutine}), box_html($s->{branch}); + box_html($s->{total}), box_html($s->{branch}), box_html($s->{subroutine}); while (<>) { - s/^(.*<td .*href="utils\/index\.html">.*)$/$tmpl$1/; + s/^(.*<td .*href="utils\/index\.html".*<\/td>.*)$/$tmpl$1/; print; } @@ -91,7 +91,8 @@ sub box_html { my ($stats) = @_; return sprintf '<td class="coverPer%s">%.1f %%</td>' . "\n" . - '<td class="coverNum%s">%d / %d</td>', + '<td class="coverNum%s">%d</td>' . "\n" . + '<td class="coverNum%s">%d</td>', box_rating($stats->{percentage}), $stats->{percentage}, - box_rating($stats->{percentage}), $stats->{covered}, $stats->{total}; + 'Dflt', $stats->{total}, 'Dflt', $stats->{covered}; } -- Dpkg.Org's dpkg

