Pierre Forstmann <[email protected]> writes:
> I'm trying to test run test coverage using master branch on Debian 13 with:
> ...
> postgres@alma:~/postgresql$ make coverage-html
> /usr/bin/lcov --gcov-tool /usr/bin/gcov -q --no-external -c -i -d . -d . 
> -o lcov_base.info
> lcov: ERROR: (usage) duplicate file ./src/backend/parser/scan.gcno in 
> both . and .
>      (use "lcov --ignore-errors usage ..." to bypass this error)
> Message summary:
>    1 error message:
>      usage: 1
> make: *** [src/Makefile.global:1065: lcov_base.info] Error 1

Yeah, recent versions of lcov are rather broken :-(.
Best bet is to apply "--ignore-errors" liberally,
and even then you'll get a bunch of useless warnings.
The output seems correct despite all that.

My coverage-running script currently does this so that
I don't see any complaints:

-----
# In RHEL 10.1 (LCOV version 2.0-1), we need a bunch of options
# to silence useless-and-probably-bogus warnings.
make -s coverage-html \
    LCOVFLAGS="-q --ignore-errors gcov,gcov" \
    GENHTML_FLAGS="-q --legend --ignore-errors unmapped,unmapped" \
    2>&1 | grep -v -e 'gcno:no functions found$' -e '^stderr:$' \
    -e 'WARNING: Duplicate specification "base-directory' \
    -e 'WARNING: Duplicate specification "build-directory'
-----

You might want to leave out the "grep -v" part until you've
satisfied yourself that no interesting messages are produced
on your installation.

                        regards, tom lane


Reply via email to