Skip to content

Commit 9ca7b0b

Browse files
committed
Allow individual TAP tests to be run via PROVE_TESTS
Add a new optional Makefile variable PROVE_TESTS that, if passed as a space-separated list of paths relative to the Makefile invoking $(prove_check) or $(prove_installcheck), runs just those tests instead of t/*.pl . From: Craig Ringer <craig@2ndquadrant.com> Reviewed-by: Michael Paquier <michael.paquier@gmail.com>
1 parent 8ce4f59 commit 9ca7b0b

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/Makefile.global.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,12 +354,12 @@ ifeq ($(enable_tap_tests),yes)
354354

355355
define prove_installcheck
356356
rm -rf $(CURDIR)/tmp_check/log
357-
cd $(srcdir) && TESTDIR='$(CURDIR)' PATH="$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' top_builddir='$(CURDIR)/$(top_builddir)' PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress' $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) t/*.pl
357+
cd $(srcdir) && TESTDIR='$(CURDIR)' PATH="$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' top_builddir='$(CURDIR)/$(top_builddir)' PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress' $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) $(if $(PROVE_TESTS),$(PROVE_TESTS),t/*.pl)
358358
endef
359359

360360
define prove_check
361361
rm -rf $(CURDIR)/tmp_check/log
362-
cd $(srcdir) && TESTDIR='$(CURDIR)' $(with_temp_install) PGPORT='6$(DEF_PGPORT)' PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress' $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) t/*.pl
362+
cd $(srcdir) && TESTDIR='$(CURDIR)' $(with_temp_install) PGPORT='6$(DEF_PGPORT)' PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress' $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) $(if $(PROVE_TESTS),$(PROVE_TESTS),t/*.pl)
363363
endef
364364

365365
else

src/test/perl/README

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ across the source tree, particularly tests in src/bin and src/test. It's used
66
to drive tests for backup and restore, replication, etc - anything that can't
77
really be expressed using pg_regress or the isolation test framework.
88

9+
The tests are invoked via perl's 'prove' command, wrapped in PostgreSQL
10+
makefiles to handle instance setup etc. See the $(prove_check) and
11+
$(prove_installcheck) targets in Makefile.global. By default every test in the
12+
t/ subdirectory is run. Individual test(s) can be run instead by passing
13+
something like PROVE_TESTS="t/001_testname.pl t/002_othertestname.pl" to make.
14+
915
You should prefer to write tests using pg_regress in src/test/regress, or
1016
isolation tester specs in src/test/isolation, if possible. If not, check to
1117
see if your new tests make sense under an existing tree in src/test, like

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy