Skip to content

Commit 8d132b2

Browse files
committed
Doc: improve explanation of how to use our code coverage infrastructure.
The reference to running "make coverage" in a subdirectory was a bit obscure, so clarify what happens when you do that. Do a little desultory copy-editing, too. Per a question from Peter Smith. Discussion: https://postgr.es/m/CAHut+Pu0r3AjRSyu5E0v2-zRj8r24OSrkWs3fEBxOuaw1i8DKA@mail.gmail.com
1 parent 8e5d1ae commit 8d132b2

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

doc/src/sgml/regress.sgml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -806,12 +806,12 @@ make check PROVE_TESTS='t/001_test1.pl t/003_test3.pl'
806806
instrumentation, so that it becomes possible to examine which
807807
parts of the code are covered by the regression tests or any other
808808
test suite that is run with the code. This is currently supported
809-
when compiling with GCC and requires the <command>gcov</command>
809+
when compiling with GCC, and it requires the <command>gcov</command>
810810
and <command>lcov</command> programs.
811811
</para>
812812

813813
<para>
814-
A typical workflow would look like this:
814+
A typical workflow looks like this:
815815
<screen>
816816
./configure --enable-coverage ... OTHER OPTIONS ...
817817
make
@@ -820,12 +820,11 @@ make coverage-html
820820
</screen>
821821
Then point your HTML browser
822822
to <filename>coverage/index.html</filename>.
823-
The <command>make</command> commands also work in subdirectories.
824823
</para>
825824

826825
<para>
827826
If you don't have <command>lcov</command> or prefer text output over an
828-
HTML report, you can also run
827+
HTML report, you can run
829828
<screen>
830829
make coverage
831830
</screen>
@@ -837,11 +836,23 @@ make coverage
837836
</para>
838837

839838
<para>
840-
To reset the execution counts between test runs, run:
839+
You can run several different tests before making the coverage report;
840+
the execution counts will accumulate. If you want
841+
to reset the execution counts between test runs, run:
841842
<screen>
842843
make coverage-clean
843844
</screen>
844845
</para>
846+
847+
<para>
848+
You can run the <literal>make coverage-html</literal> or <literal>make
849+
coverage</literal> command in a subdirectory if you want a coverage
850+
report for only a portion of the code tree.
851+
</para>
852+
853+
<para>
854+
Use <literal>make distclean</literal> to clean up when done.
855+
</para>
845856
</sect1>
846857

847858
</chapter>

0 commit comments

Comments
 (0)