Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit ad69bd0

Browse files
committed
Add mode where contrib installcheck runs each module in a separately named database.
Normally each module is tested in a database named contrib_regression, which is dropped and recreated at the beginhning of each pg_regress run. This new 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. Second attempt at this, this time accomodating make versions older than 3.82. 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 acdb8c2 commit ad69bd0

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

contrib/dblink/Makefile

+3
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 USE_MODULE_DB =
16+
1417
ifdef USE_PGXS
1518
PG_CONFIG = pg_config
1619
PGXS := $(shell $(PG_CONFIG) --pgxs)

src/Makefile.global.in

+9
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

+5-1
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+
ifneq ($(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)