doc: Add guidelines to generate coverage reports with meson
These instructions were already available for configure-based builds, but not the meson-based builds. This commit closes the gap. Reviewed-by: Peter Eisentraut Discussion: https://postgr.es/m/d3751ca3-1ac9-cc5e-9315-cf9fb0eaa9e9@enterprisedb.com
This commit is contained in:
parent
0d237aeeba
commit
f1c3963292
@ -825,10 +825,12 @@ PG_TEST_NOCLEAN=1 make -C src/bin/pg_dump check
|
||||
instrumentation, so that it becomes possible to examine which
|
||||
parts of the code are covered by the regression tests or any other
|
||||
test suite that is run with the code. This is currently supported
|
||||
when compiling with GCC, and it requires the <command>gcov</command>
|
||||
and <command>lcov</command> programs.
|
||||
when compiling with GCC, and it requires the <literal>gcov</literal>
|
||||
and <literal>lcov</literal> packages.
|
||||
</para>
|
||||
|
||||
<sect2 id="regress-coverage-configure">
|
||||
<title>Coverage with Autoconf and Make</title>
|
||||
<para>
|
||||
A typical workflow looks like this:
|
||||
<screen>
|
||||
@ -872,6 +874,28 @@ make coverage-clean
|
||||
<para>
|
||||
Use <literal>make distclean</literal> to clean up when done.
|
||||
</para>
|
||||
</sect2>
|
||||
|
||||
<sect2 id="regress-coverage-meson">
|
||||
<title>Coverage with Meson</title>
|
||||
<para>
|
||||
A typical workflow looks like this:
|
||||
<screen>
|
||||
meson setup -Db_coverage=true ... OTHER OPTIONS ... builddir/
|
||||
meson compile -C builddir/
|
||||
meson test -C builddir/
|
||||
cd builddir/
|
||||
ninja coverage-html
|
||||
</screen>
|
||||
Then point your HTML browser
|
||||
to <filename>./meson-logs/coveragereport/index.html</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
You can run several different tests before making the coverage report;
|
||||
the execution counts will accumulate.
|
||||
</para>
|
||||
</sect2>
|
||||
</sect1>
|
||||
|
||||
</chapter>
|
||||
|
Loading…
x
Reference in New Issue
Block a user