Hi,

On Mon, 26 May 2025 at 16:40, Álvaro Herrera <alvhe...@kurilemu.de> wrote:
>
> Hi
>
> I updated our coverage building server from bullseye to bookworm today.
> That got us from lcov 1.14 to ... 1.16.  Disappointing!  But lcov 2.0,
> with support for differential report, is just around the corner, so I
> thought I could spend some time figuring out how to make it generate
> those reports.  Could you share the scripts you used to create these
> reports?
>
> Incidentally, the reports you posted last
> https://anarazel.de/postgres/cov/16-vs-HEAD-2024-04-14/src/index-bin_date.html#B0
> seem to have lost files?  Clicking around I get a bunch of 404s.

Andres and I have been working on generating automated differential
code coverage reports for Postgres. The code is available in the
following repository: [1].

Branches are:

main -> uses the Meson build system.
make-builds -> uses Make build system.
make-builds-wo-base -> Also uses Make, but skips the initial lcov
report generation after the build phase. Instead, it generates a
single report after running the tests.

The main script is code_coverage.sh, which automatically generates
differential coverage reports by comparing the current master branch
with the latest REL_*_STABLE branch. There is currently one known
issue: the number of UNC (uncovered) lines in the report seems too
low. We suspect this is due to too many warnings being silenced during
the build, which may affect the accuracy of the UNC count. I haven't
had a chance to revisit and address this part yet.

To run the script, simply execute ./code_coverage.sh. Optionally, run
it with the argument true (i.e., './code_coverage.sh true') to move
the generated HTML report to your Apache directory for easier viewing.

The implementation is still a work in progress, and the code may be a
bit messy :(.

Please feel free to ask any questions! I am interested in this area,
if you would like we can work on it together.

[1] https://github.com/nbyavuz/postgres-code-coverage

-- 
Regards,
Nazir Bilal Yavuz
Microsoft


Reply via email to