Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8541304

Browse files
committed
Handle USE_MODULE_DB for all tests able to use an installed postmaster.
When $(MODULES) and $(MODULE_big) are empty, derive the database namefrom the first element of $(REGRESS) instead of using a constant string.When deriving the database name from $(MODULES), use its first elementinstead of the entire list; the earlier approach would fail if anymulti-module directory had $(REGRESS) tests. Treat isolation suites andsrc/pl correspondingly. Under USE_MODULE_DB=1, installcheck-world andcheck-world no longer reuse any database name in a given postmaster.Buildfarm members axolotl, mandrill and frogfish saw spurious "is beingaccessed by other users" failures that would not have happened withoutdatabase name reuse. (The CountOtherDBBackends() 5s deadline expiredduring DROP DATABASE; a backend for an earlier test suite had used thesame database name and had not yet exited.) Back-patch to 9.4 (allsupported versions), except bits pertaining to isolation suites.Concept reviewed by Andrew Dunstan, Andres Freund and Tom Lane.Discussion:https://postgr.es/m/20190401135213.GE891537@rfd.leadboat.com
1 parent7c414cd commit8541304

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

‎src/Makefile.global.in

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -552,16 +552,21 @@ submake-generated-headers:
552552
#
553553
# Testing support
554554

555-
PL_TESTDB = pl_regression
556-
CONTRIB_TESTDB = contrib_regression
557-
ifneq ($(MODULE_big),)
558-
CONTRIB_TESTDB_MODULE = contrib_regression_$(MODULE_big)
559-
else
560-
ifneq ($(MODULES),)
561-
CONTRIB_TESTDB_MODULE = contrib_regression_$(MODULES)
555+
ifneq ($(USE_MODULE_DB),)
556+
PL_TESTDB = pl_regression_$(NAME)
557+
# Replace this with $(or ...) if we ever require GNU make 3.81.
558+
ifneq ($(MODULE_big),)
559+
CONTRIB_TESTDB=contrib_regression_$(MODULE_big)
562560
else
563-
CONTRIB_TESTDB_MODULE = contrib_regression
561+
ifneq ($(MODULES),)
562+
CONTRIB_TESTDB=contrib_regression_$(word 1,$(MODULES))
563+
else
564+
CONTRIB_TESTDB=contrib_regression_$(word 1,$(REGRESS))
565+
endif
564566
endif
567+
else
568+
PL_TESTDB = pl_regression
569+
CONTRIB_TESTDB = contrib_regression
565570
endif
566571

567572
ifdefNO_LOCALE

‎src/makefiles/pgxs.mk

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,12 +252,7 @@ distclean maintainer-clean: clean
252252

253253
ifdefREGRESS
254254

255-
# Select database to use for running the tests
256-
ifneq ($(USE_MODULE_DB),)
257-
REGRESS_OPTS += --dbname=$(CONTRIB_TESTDB_MODULE)
258-
else
259-
REGRESS_OPTS += --dbname=$(CONTRIB_TESTDB)
260-
endif
255+
REGRESS_OPTS += --dbname=$(CONTRIB_TESTDB)
261256

262257
# When doing a VPATH build, must copy over the data files so that the
263258
# driver script can find them. We have to use an absolute path for

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp