1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-30 11:03:19 +03:00

Run only top-level recursive lcov

This is the way lcov was intended to be used.  It is much faster and
more robust and makes the makefiles simpler than running it in each
subdirectory.

The previous coding ran gcov before lcov, but that is useless because
lcov/geninfo call gcov internally and use that information.  Moreover,
this led to complications and failures during parallel make.  This
separates the two targets:  You either use "make coverage" to get
textual output from gcov or "make coverage-html" to get an HTML report
via lcov.  (Using both is still problematic because they write the same
output files.)

Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
This commit is contained in:
Peter Eisentraut
2017-08-10 23:33:47 -04:00
parent 7769fc000a
commit 504923a0ed
3 changed files with 30 additions and 12 deletions

View File

@ -706,6 +706,19 @@ make coverage-html
The <command>make</command> commands also work in subdirectories.
</para>
<para>
If you don't have <command>lcov</command> or prefer text output over an
HTML report, you can also run
<screen>
make coverage
</screen>
instead of <literal>make coverage-html</literal>, which will
produce <filename>.gcov</filename> output files for each source file
relevant to the test. (<literal>make coverage</literal> and <literal>make
coverage-html</literal> will overwrite each other's files, so mixing them
might be confusing.)
</para>
<para>
To reset the execution counts between test runs, run:
<screen>