diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2021-07-01 08:29:10 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2021-07-01 08:46:38 -0400 |
commit | a8b564b0c9c39e8bdd6cde4245c3340f72c28899 (patch) | |
tree | d08ad5960b1b8f2270c73ac83995da3db48f9d9d /src | |
parent | 41edb2db1b9161fe5c100d3806e08c63a9f89196 (diff) | |
download | postgresql-a8b564b0c9c39e8bdd6cde4245c3340f72c28899.tar.gz postgresql-a8b564b0c9c39e8bdd6cde4245c3340f72c28899.zip |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile.global.in | 23 | ||||
-rw-r--r-- | src/test/recovery/Makefile | 4 |
2 files changed, 25 insertions, 2 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in index 9a6265b3a0b..ae27b58a278 100644 --- a/src/Makefile.global.in +++ b/src/Makefile.global.in @@ -444,16 +444,35 @@ with_temp_install = \ ifeq ($(enable_tap_tests),yes) +ifndef PGXS define prove_installcheck rm -rf '$(CURDIR)'/tmp_check $(MKDIR_P) '$(CURDIR)'/tmp_check -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) +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' \ + $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) $(if $(PROVE_TESTS),$(PROVE_TESTS),t/*.pl) endef +else # PGXS case +define prove_installcheck +rm -rf '$(CURDIR)'/tmp_check +$(MKDIR_P) '$(CURDIR)'/tmp_check +cd $(srcdir) && \ + TESTDIR='$(CURDIR)' PATH="$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' \ + top_builddir='$(top_builddir)' \ + PG_REGRESS='$(top_builddir)/src/test/regress/pg_regress' \ + $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) $(if $(PROVE_TESTS),$(PROVE_TESTS),t/*.pl) +endef +endif # PGXS define prove_check rm -rf '$(CURDIR)'/tmp_check $(MKDIR_P) '$(CURDIR)'/tmp_check -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) +cd $(srcdir) && \ + TESTDIR='$(CURDIR)' $(with_temp_install) PGPORT='6$(DEF_PGPORT)' \ + PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress' \ + $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) $(if $(PROVE_TESTS),$(PROVE_TESTS),t/*.pl) endef else diff --git a/src/test/recovery/Makefile b/src/test/recovery/Makefile index fa8e0315267..04ff5147790 100644 --- a/src/test/recovery/Makefile +++ b/src/test/recovery/Makefile @@ -15,6 +15,10 @@ subdir = src/test/recovery top_builddir = ../../.. include $(top_builddir)/src/Makefile.global +# required for 017_shm.pl +REGRESS_SHLIB=$(abs_top_builddir)/src/test/regress/regress$(DLSUFFIX) +export REGRESS_SHLIB + check: $(prove_check) |