aboutsummaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2008-09-05 12:11:18 +0000
committerPeter Eisentraut <peter_e@gmx.net>2008-09-05 12:11:18 +0000
commit11f53b1063e796dbb766b7ad3fd46e98806bea43 (patch)
treee77ab3e271f7d464e88e481715997a09bde14e65 /doc/src
parent579d9a520135078d96eef8335aed399833d33b7e (diff)
downloadpostgresql-11f53b1063e796dbb766b7ad3fd46e98806bea43.tar.gz
postgresql-11f53b1063e796dbb766b7ad3fd46e98806bea43.zip
Code coverage testing with gcov. Documentation is in the regression test
chapter. Author: Michelle Caisse <Michelle.Caisse@Sun.COM>
Diffstat (limited to 'doc/src')
-rw-r--r--doc/src/sgml/installation.sgml17
-rw-r--r--doc/src/sgml/regress.sgml36
2 files changed, 50 insertions, 3 deletions
diff --git a/doc/src/sgml/installation.sgml b/doc/src/sgml/installation.sgml
index a5dfa8d0810..cee4681ce39 100644
--- a/doc/src/sgml/installation.sgml
+++ b/doc/src/sgml/installation.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.312 2008/08/29 13:02:32 petere Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/installation.sgml,v 1.313 2008/09/05 12:11:18 petere Exp $ -->
<chapter id="installation">
<title><![%standalone-include[<productname>PostgreSQL</>]]>
@@ -1234,6 +1234,21 @@ su - postgres
</varlistentry>
<varlistentry>
+ <term><option>--enable-coverage</option></term>
+ <listitem>
+ <para>
+ If using GCC, all programs and libraries are compiled with
+ code coverage testing instrumentation. When run, they
+ generate files in the build directory with code coverage
+ metrics.
+ <![%standalone-ignore[See <xref linkend="regress-coverage">
+ for more information.]]> This option is for use only with GCC
+ and when doing development work.
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><option>--enable-profiling</option></term>
<listitem>
<para>
diff --git a/doc/src/sgml/regress.sgml b/doc/src/sgml/regress.sgml
index d09137fcc0f..0e082603bf1 100644
--- a/doc/src/sgml/regress.sgml
+++ b/doc/src/sgml/regress.sgml
@@ -1,4 +1,4 @@
-<!-- $PostgreSQL: pgsql/doc/src/sgml/regress.sgml,v 1.59 2008/05/30 00:04:32 tgl Exp $ -->
+<!-- $PostgreSQL: pgsql/doc/src/sgml/regress.sgml,v 1.60 2008/09/05 12:11:18 petere Exp $ -->
<chapter id="regress">
<title id="regress-title">Regression Tests</title>
@@ -419,5 +419,37 @@ float8:out:i.86-.*-openbsd=float8-small-is-zero.out
</para>
</sect1>
-
+
+ <sect1 id="regress-coverage">
+ <title>Test Coverage Examination</title>
+
+ <para>
+ The PostgreSQL source code can be compiled with coverage testing
+ 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 requires the <command>gcov</command>
+ and <command>lcov</command> programs.
+ </para>
+
+ <para>
+ A typical workflow would look like this:
+<screen>
+./configure --enable-coverage ... OTHER OPTIONS ...
+gmake
+gmake check # or other test suite
+gmake coverage-html
+</screen>
+ Then point your HTML browser
+ to <filename>coverage/index.html</filename>.
+ </para>
+
+ <para>
+ To reset the execution counts between test runs, run
+<screen>
+gmake coverage-clean
+</screen>
+ </para>
+ </sect1>
+
</chapter>