do coverage test without install lcov

Started by wangsh.fnst@fujitsu.comover 5 years ago2 messageshackers
Beta feature

Hackorum builds and tests every patch posted to the lists, not only commitfest submissions. This is Hackorum's own CI rather than the PostgreSQL project's, and it is still under testing - please report anything that looks wrong.

appliessuccessCI history

You can run a PostgreSQL built from this patch straight from Docker, with no checkout and no build:

docker run --rm -p 5432:5432 ghcr.io/hackorum-dev/postgres-patch:t43736
psql -h localhost -U postgres

Built from patchset v1 (message #1), September 20, 2026 at 08:01 AM.

Every patchset is also pushed to a branch of our PostgreSQL fork, so you can check out the same tree CI built. Without a PostgreSQL checkout:

git clone --branch t43736_1 https://github.com/hackorum-dev/postgres.git

In a checkout you already have, add the fork once:

git remote add hackorum https://github.com/hackorum-dev/postgres.git

then, for this patchset and every later one:

git fetch hackorum t43736_1 && git checkout t43736_1

Patchset v1 (message #1) is on t43736_1

Jump to latest
#1wangsh.fnst@fujitsu.com
wangsh.fnst@fujitsu.com

Hi, hackers

In [1]https://www.postgresql.org/docs/13/regress-coverage.html wrote:

If you don't have lcov or prefer text output over an HTML report, you can also run
make coverage

[1]: https://www.postgresql.org/docs/13/regress-coverage.html

It seems the lcov is not a necessary program to run a coverage test.

But when I configure with --enable-coverage, then error was reported:
checking for lcov... no
configure: error: lcov not found

Because it's a little difficult to install lcov in offline environment and we can get a
text format result by running make coverage. How about change this action, when
there is no lcov in system, only a warning message is reported.

The patch attached. Thought ?

Best regards
Shenhao Wang

Attachments:

t43736_1
0001-make-enable-coverage-success-without-lcov.patchapplication/octet-stream; name=0001-make-enable-coverage-success-without-lcov.patchDownload+17-7
#2Tom Lane
tgl@sss.pgh.pa.us
In reply to: wangsh.fnst@fujitsu.com (#1)
Re: do coverage test without install lcov

"wangsh.fnst@fujitsu.com" <wangsh.fnst@fujitsu.com> writes:

Because it's a little difficult to install lcov in offline environment and we can get a
text format result by running make coverage. How about change this action, when
there is no lcov in system, only a warning message is reported.

The patch attached. Thought ?

This should use the "missing" mechanism that's already used for,
e.g., flex and bison.

regards, tom lane