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

Commit a40f8ea

Browse 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 b5ee867 commit a40f8ea

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

src/Makefile.global.in

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,16 +428,35 @@ with_temp_install = \
428428

429429
ifeq ($(enable_tap_tests),yes)
430430

431+
ifndef PGXS
431432
define prove_installcheck
432433
rm -rf '$(CURDIR)'/tmp_check
433434
$(MKDIR_P) '$(CURDIR)'/tmp_check
434-
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) $(if $(PROVE_TESTS),$(PROVE_TESTS),t/*.pl)
435+
cd $(srcdir) && \
436+
TESTDIR='$(CURDIR)' PATH="$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' \
437+
top_builddir='$(CURDIR)/$(top_builddir)' \
438+
PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress' \
439+
$(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) $(if $(PROVE_TESTS),$(PROVE_TESTS),t/*.pl)
435440
endef
441+
else # PGXS case
442+
define prove_installcheck
443+
rm -rf '$(CURDIR)'/tmp_check
444+
$(MKDIR_P) '$(CURDIR)'/tmp_check
445+
cd $(srcdir) && \
446+
TESTDIR='$(CURDIR)' PATH="$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' \
447+
top_builddir='$(top_builddir)' \
448+
PG_REGRESS='$(top_builddir)/src/test/regress/pg_regress' \
449+
$(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) $(if $(PROVE_TESTS),$(PROVE_TESTS),t/*.pl)
450+
endef
451+
endif # PGXS
436452

437453
define prove_check
438454
rm -rf '$(CURDIR)'/tmp_check
439455
$(MKDIR_P) '$(CURDIR)'/tmp_check
440-
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) $(if $(PROVE_TESTS),$(PROVE_TESTS),t/*.pl)
456+
cd $(srcdir) && \
457+
TESTDIR='$(CURDIR)' $(with_temp_install) PGPORT='6$(DEF_PGPORT)' \
458+
PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress' \
459+
$(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) $(if $(PROVE_TESTS),$(PROVE_TESTS),t/*.pl)
441460
endef
442461

443462
else

src/test/recovery/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ subdir = src/test/recovery
1515
top_builddir = ../../..
1616
include $(top_builddir)/src/Makefile.global
1717

18+
# required for 017_shm.pl
19+
REGRESS_SHLIB=$(abs_top_builddir)/src/test/regress/regress$(DLSUFFIX)
20+
export REGRESS_SHLIB
21+
1822
check:
1923
$(prove_check)
2024

0 commit comments

Comments
 (0)