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

Commitf433394

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 parent2f932f7 commitf433394

File tree

2 files changed

+22
-14
lines changed

2 files changed

+22
-14
lines changed

‎src/Makefile.global.in

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -597,16 +597,25 @@ submake-libpgfeutils: | submake-generated-headers
597597
#
598598
# Testing support
599599

600-
PL_TESTDB = pl_regression
601-
CONTRIB_TESTDB = contrib_regression
602-
ifneq ($(MODULE_big),)
603-
CONTRIB_TESTDB_MODULE = contrib_regression_$(MODULE_big)
604-
else
605-
ifneq ($(MODULES),)
606-
CONTRIB_TESTDB_MODULE = contrib_regression_$(MODULES)
600+
ifneq ($(USE_MODULE_DB),)
601+
PL_TESTDB = pl_regression_$(NAME)
602+
# Replace this with $(or ...) if we ever require GNU make 3.81.
603+
ifneq ($(MODULE_big),)
604+
CONTRIB_TESTDB=contrib_regression_$(MODULE_big)
605+
ISOLATION_TESTDB=isolation_regression_$(MODULE_big)
607606
else
608-
CONTRIB_TESTDB_MODULE = contrib_regression
607+
ifneq ($(MODULES),)
608+
CONTRIB_TESTDB=contrib_regression_$(word 1,$(MODULES))
609+
ISOLATION_TESTDB=isolation_regression_$(word 1,$(MODULES))
610+
else
611+
CONTRIB_TESTDB=contrib_regression_$(word 1,$(REGRESS))
612+
ISOLATION_TESTDB=isolation_regression_$(word 1,$(ISOLATION))
613+
endif
609614
endif
615+
else
616+
PL_TESTDB = pl_regression
617+
CONTRIB_TESTDB = contrib_regression
618+
ISOLATION_TESTDB = isolation_regression
610619
endif
611620

612621
ifdefNO_LOCALE

‎src/makefiles/pgxs.mk

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -380,12 +380,7 @@ distclean maintainer-clean: clean
380380

381381
ifdefREGRESS
382382

383-
# Select database to use for running the tests
384-
ifneq ($(USE_MODULE_DB),)
385-
REGRESS_OPTS += --dbname=$(CONTRIB_TESTDB_MODULE)
386-
else
387-
REGRESS_OPTS += --dbname=$(CONTRIB_TESTDB)
388-
endif
383+
REGRESS_OPTS += --dbname=$(CONTRIB_TESTDB)
389384

390385
# When doing a VPATH build, must copy over the data files so that the
391386
# driver script can find them. We have to use an absolute path for
@@ -413,6 +408,10 @@ ifndef PGXS
413408
$(MAKE) -C $(top_builddir)/src/test/isolation all
414409
endif
415410

411+
ifdefISOLATION
412+
ISOLATION_OPTS += --dbname=$(ISOLATION_TESTDB)
413+
endif
414+
416415
# Standard rules to run regression tests including multiple test suites.
417416
# Runs against an installed postmaster.
418417
ifndefNO_INSTALLCHECK

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp