32.4. TAP Tests
Various tests, particularly the client program tests
src/bin, use the Perl TAP tools and are run
using the Perl testing program
prove. You can pass
command-line options to
prove by setting
PROVE_FLAGS, for example:
make -C src/bin check PROVE_FLAGS='--timer'
See the manual page of
prove for more information.
can be used to define a whitespace-separated list of paths relative
to run the specified subset of tests instead of the default
t/*.pl. For example:
make check PROVE_TESTS='t/001_test1.pl t/003_test3.pl'
The TAP tests require the Perl module
This module is available from CPAN or an operating system package.
Generically speaking, the TAP tests will test the executables in a
previously-installed installation tree if you say
installcheck, or will build a new local installation tree from
current sources if you say
make check. In either
case they will initialize a local instance (data directory) and
transiently run a server in it. Some of these tests run more than one
server. Thus, these tests can be fairly resource-intensive.
It's important to realize that the TAP tests will start test server(s)
even when you say
make installcheck; this is unlike
the traditional non-TAP testing infrastructure, which expects to use an
already-running test server in that case. Some PostgreSQL
subdirectories contain both traditional-style and TAP-style tests,
make installcheck will produce a mix of
results from temporary servers and the already-running test server.