aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorStephen Frost <sfrost@snowman.net>2015-09-08 17:38:30 -0400
committerStephen Frost <sfrost@snowman.net>2015-09-08 17:38:30 -0400
commited476669e998b788770f07338aefd2594ff4cce9 (patch)
tree995bac8728909467e0525eee5b491be6649727f0 /src
parent83d004904d82759118635dc1a6a7503d4da785e9 (diff)
downloadpostgresql-ed476669e998b788770f07338aefd2594ff4cce9.tar.gz
postgresql-ed476669e998b788770f07338aefd2594ff4cce9.zip
Add temp-check, with_temp_install definition - 9.4
Commit fa4a4df93c8c28d5684cacb1677fbd13f58bb9f2 attempted to backpatch to 9.4 a change to improve the logging of TAP tests. Unfortunately, due to how 9.4 and 9.5 had diverged, the backpatch to 9.4 depended on a few things which didn't exist in 9.4 (but did in 9.5), specifically, the 'temp-check' production and the 'with_temp_install' definition (which also required 'abs_top_builddir'). Add these definitions into REL9_4_STABLE to allow the TAP tests to run correctly under 'make check'.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.global.in18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 13d4aa371e1..bea05ad0e71 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -59,6 +59,7 @@ endif
endif
else # not PGXS
vpath_build = @vpath_build@
+abs_top_builddir = @abs_top_builddir@
abs_top_srcdir = @abs_top_srcdir@
ifneq ($(vpath_build),yes)
@@ -316,6 +317,19 @@ BZIP2 = bzip2
# Testing
+check: temp-install
+
+.PHONY: temp-install
+temp-install:
+ifndef NO_TEMP_INSTALL
+ifeq ($(MAKELEVEL),0)
+ rm -rf '$(abs_top_builddir)'/tmp_install
+ $(MKDIR_P) '$(abs_top_builddir)'/tmp_install/log
+ $(MAKE) -C '$(top_builddir)' DESTDIR='$(abs_top_builddir)'/tmp_install install >'$(abs_top_builddir)'/tmp_install/log/install.log 2>&1
+endif
+ $(if $(EXTRA_INSTALL),for extra in $(EXTRA_INSTALL); do $(MAKE) -C '$(top_builddir)'/$$extra DESTDIR='$(abs_top_builddir)'/tmp_install install >>'$(abs_top_builddir)'/tmp_install/log/install.log || exit; done)
+endif
+
PROVE = @PROVE@
PG_PROVE_FLAGS = -I $(top_srcdir)/src/test/perl/
PROVE_FLAGS = --verbose
@@ -330,6 +344,10 @@ define ld_library_path_var
$(if $(filter $(PORTNAME),darwin),DYLD_LIBRARY_PATH,$(if $(filter $(PORTNAME),aix),LIBPATH,LD_LIBRARY_PATH))
endef
+define with_temp_install
+PATH="$(abs_top_builddir)/tmp_install$(bindir):$$PATH" $(call add_to_path,$(ld_library_path_var),$(abs_top_builddir)/tmp_install$(libdir))
+endef
+
ifeq ($(enable_tap_tests),yes)
define prove_installcheck