Skip to content

Commit e2b3c21

Browse files
committed
Add mode where contrib installcheck runs each module in a separately named database.
Normally each module is tested in aq database named contrib_regression, which is dropped and recreated at the beginhning of each pg_regress run. This mode, enabled by adding USE_MODULE_DB=1 to the make command line, runs most modules in a database with the module name embedded in it. This will make testing pg_upgrade on clusters with the contrib modules a lot easier. Still to be done: adapt to the MSVC build system. Backpatch to 9.0, which is the earliest version it is reasonably possible to test upgrading from.
1 parent fc75d4f commit e2b3c21

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

contrib/dblink/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ DATA = dblink--1.1.sql dblink--1.0--1.1.sql dblink--unpackaged--1.0.sql
1111

1212
REGRESS = dblink
1313

14+
# the db name is hard-coded in the tests
15+
override undefine USE_MODULE_DB
16+
1417
ifdef USE_PGXS
1518
PG_CONFIG = pg_config
1619
PGXS := $(shell $(PG_CONFIG) --pgxs)

src/Makefile.global.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,15 @@ submake-libpgport:
428428

429429
PL_TESTDB = pl_regression
430430
CONTRIB_TESTDB = contrib_regression
431+
ifneq ($(MODULE_big),)
432+
CONTRIB_TESTDB_MODULE = contrib_regression_$(MODULE_big)
433+
else
434+
ifneq ($(MODULES),)
435+
CONTRIB_TESTDB_MODULE = contrib_regression_$(MODULES)
436+
else
437+
CONTRIB_TESTDB_MODULE = contrib_regression
438+
endif
439+
endif
431440

432441
ifdef NO_LOCALE
433442
NOLOCALE += --no-locale

src/makefiles/pgxs.mk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,11 @@ distclean maintainer-clean: clean
240240
ifdef REGRESS
241241

242242
# Select database to use for running the tests
243-
REGRESS_OPTS += --dbname=$(CONTRIB_TESTDB)
243+
ifdef USE_MODULE_DB
244+
REGRESS_OPTS += --dbname=$(CONTRIB_TESTDB_MODULE)
245+
else
246+
REGRESS_OPTS += --dbname=$(CONTRIB_TESTDB)
247+
endif
244248

245249
# where to find psql for running the tests
246250
PSQLDIR = $(bindir)

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