Subject: Re: Having problems generating a code coverage report

From: Álvaro Herrera <[email-masked]>
Date: Tue, 17 Feb 2026 18:28:24 +0100

On 2026-Feb-17, Álvaro Herrera wrote:

> Nope, it's a straight in-tree build.  I made it work after a few more
> failed tries with a call like
> 
> GENHTML_FLAGS="-q --legend --ignore-errors unmapped,corrupt,inconsistent,range"
> LCOVFLAGS="-q --legend --ignore-errors usage"
> make coverage-html

Correction.  These variables are not taken into account if given as
environment variables, but they are if given as make arguments.
Moreover, --legend makes lcov die.  So, apparently this one works:

make coverage-html LCOVFLAGS="-q --ignore-errors usage" GENHTML_FLAGS="-q --legend --ignore-errors unmapped,corrupt,inconsistent,range"

I also removed a file called .lcovrc that only had this line
  lcov_branch_coverage = 0
though that doesn't appear to have automatically added branch coverage
to the report.  However, I'll wait until the next run to see if anything
changes.

The CSS problem appears to have been a caching glitch, and now it works,
so I guess the cached file must have expired.  It looks Christmas-treeish
again now.

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/
"No renuncies a nada. No te aferres a nada."

---

From: Michael Paquier <[email-masked]>
Date: Wed, 18 Feb 2026 15:21:21 +0900

> to the report.  However, I'll wait until the next run to see if anything

Based on your ideas, I have been able to get my way through today with
this modified artistic flavor, for a non-VPATH build, in a Fedora
environment:
make coverage-html \
    LCOVFLAGS="-q --ignore-errors gcov,gcov" \
    GENHTML_FLAGS="-q --legend --ignore-errors unmapped,corrupt,unmapped,inconsistent"
--
Michael