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

Appearance settings

Commit d173a46

Browse filesBrowse files
committed
Fix prove_installcheck to use correct paths when used with PGXS
The prove_installcheck recipe in src/Makefile.global.in was emitting bogus paths for a couple of elements when used with PGXS. Here we create a separate recipe for the PGXS case that does it correctly. We also take the opportunity to make the make the file more readable by breaking up the prove_installcheck and prove_check recipes across several lines, and to remove the setting for REGRESS_SHLIB to src/test/recovery/Makefile, which is the only set of tests that actually need it. Backpatch to all live branches Discussion: https://postgr.es/m/f2401388-936b-f4ef-a07c-a0bcc49b3300@dunslane.net
1 parent 68bad23 commit d173a46
Copy full SHA for d173a46

File tree

2 files changed

+24
-2
lines changed
Filter options

2 files changed

+24
-2
lines changed

‎src/Makefile.global.in

Copy file name to clipboardExpand all lines: src/Makefile.global.in
+20-2Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,14 +370,32 @@ with_temp_install = \
370370

371371
ifeq ($(enable_tap_tests),yes)
372372

373+
ifndef PGXS
374+
define prove_installcheck
375+
rm -rf $(CURDIR)/tmp_check/log
376+
cd $(srcdir) && \
377+
TESTDIR='$(CURDIR)' PATH="$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' \
378+
top_builddir='$(CURDIR)/$(top_builddir)' \
379+
PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress' \
380+
$(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) t/*.pl
381+
endef
382+
else # PGXS case
373383
define prove_installcheck
374384
rm -rf $(CURDIR)/tmp_check/log
375-
cd $(srcdir) && TESTDIR='$(CURDIR)' PATH="$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' top_builddir='$(CURDIR)/$(top_builddir)' PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress' REGRESS_SHLIB='$(abs_top_builddir)/src/test/regress/regress$(DLSUFFIX)' $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) t/*.pl
385+
cd $(srcdir) && \
386+
TESTDIR='$(CURDIR)' PATH="$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' \
387+
top_builddir='$(top_builddir)' \
388+
PG_REGRESS='$(top_builddir)/src/test/regress/pg_regress' \
389+
$(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) t/*.pl
376390
endef
391+
endif # PGXS
377392

378393
define prove_check
379394
rm -rf $(CURDIR)/tmp_check/log
380-
cd $(srcdir) && TESTDIR='$(CURDIR)' $(with_temp_install) PGPORT='6$(DEF_PGPORT)' PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress' REGRESS_SHLIB='$(abs_top_builddir)/src/test/regress/regress$(DLSUFFIX)' $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) t/*.pl
395+
cd $(srcdir) && \
396+
TESTDIR='$(CURDIR)' $(with_temp_install) PGPORT='6$(DEF_PGPORT)' \
397+
PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress' \
398+
$(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) t/*.pl
381399
endef
382400

383401
else

‎src/test/recovery/Makefile

Copy file name to clipboardExpand all lines: src/test/recovery/Makefile
+4Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ subdir = src/test/recovery
1313
top_builddir = ../../..
1414
include $(top_builddir)/src/Makefile.global
1515

16+
# required for 017_shm.pl
17+
REGRESS_SHLIB=$(abs_top_builddir)/src/test/regress/regress$(DLSUFFIX)
18+
export REGRESS_SHLIB
19+
1620
check:
1721
$(prove_check)
1822

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.