Skip to content

Commit fe20ff0

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 172d067 commit fe20ff0

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
@@ -10,6 +10,9 @@ DATA = uninstall_dblink.sql
1010
REGRESS = dblink
1111

1212

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

src/Makefile.global.in

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,15 @@ BZIP2 = bzip2
284284

285285
PL_TESTDB = pl_regression
286286
CONTRIB_TESTDB = contrib_regression
287+
ifneq ($(MODULE_big),)
288+
CONTRIB_TESTDB_MODULE = contrib_regression_$(MODULE_big)
289+
else
290+
ifneq ($(MODULES),)
291+
CONTRIB_TESTDB_MODULE = contrib_regression_$(MODULES)
292+
else
293+
CONTRIB_TESTDB_MODULE = contrib_regression
294+
endif
295+
endif
287296

288297
# Installation.
289298

src/makefiles/pgxs.mk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,11 @@ ifdef REGRESS
233233

234234
# Calling makefile can set REGRESS_OPTS, but this is the default:
235235
ifndef REGRESS_OPTS
236-
REGRESS_OPTS = --dbname=$(CONTRIB_TESTDB)
236+
ifneq ($(USE_MODULE_DB),)
237+
REGRESS_OPTS = --dbname=$(CONTRIB_TESTDB_MODULE)
238+
else
239+
REGRESS_OPTS = --dbname=$(CONTRIB_TESTDB)
240+
endif
237241
endif
238242

239243
# where to find psql for running the tests

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