| From: | Michael Paquier <michael(at)paquier(dot)xyz> |
|---|---|
| To: | Andres Freund <andres(at)anarazel(dot)de> |
| Cc: | Aleksander Alekseev <aleksander(at)timescale(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, jian he <jian(dot)universality(at)gmail(dot)com>, Peter Geoghegan <pg(at)bowt(dot)ie> |
| Subject: | Re: Having problems generating a code coverage report |
| Date: | 2026-01-22 05:35:40 |
| Message-ID: | aXG3LM7z9BDSvF6U@paquier.xyz |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Wed, Jan 21, 2026 at 08:59:45PM -0500, Andres Freund wrote:
> I have the following .lcovrc in my postgres source dir:
>
> ignore_errors=inconsistent,gcov,range
> check_data_consistency=0
> stop_on_error=0
> genhtml_hierarchical=1
> genhtml_show_navigation=1
> parallel=16
> geninfo_gcov_tool=/usr/bin/gcov-15
>
> (assuming you build with gcc 15)
>
> With that meson coverage information works (i.e. ninja coverage-html) for both
> lcov 2.0 and 2.4 as long as the build directory is outside of the source
> directory. Both on Debian Sid and macos.
Thanks for sharing. Yes, I have a matching gcc version at 15.2
currently. I have been playing with this area of the configuration
for some time without finding the correct combination before giving
up, and these suggestions are actually helping for meson. So now I
can get a report offline. Yeah at least it's one thing working.
Hmm. configure with and without VPATH still burp at me on HEAD. If I
tweak the lcov commands in src/Makefile.global.in like in the attached
patch then the non-VPATH build can work, where I remove the srcdir
part (aka reverting c3d9a66024a9). For the VPATH build, this patch
does not work at all, it generates an incomplete report, ignoring
entirely contrib/, with its base index.html starting inside src/,
missing a bunch of subdirectories. I can live with this custom patch
for now, just wondering if anybody else sees what I am seeing for a
few months now.
Thoughts? At least two out of the three methods are working with the
attached instead of one out of three. Not sure what to do with VPATH,
but well.
--
Michael
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Tweak-lcov-commands.patch | text/x-diff | 992 bytes |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Chao Li | 2026-01-22 05:45:05 | Re: ALTER TABLE: warn when actions do not recurse to partitions |
| Previous Message | Shinya Kato | 2026-01-22 05:34:34 | Avoid recalculating pgprocno in ProcArrayAdd() |