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

Commit ed47666

Browse files
committed
Add temp-check, with_temp_install definition - 9.4
Commit fa4a4df 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'.
1 parent 83d0049 commit ed47666

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/Makefile.global.in

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ endif
5959
endif
6060
else # not PGXS
6161
vpath_build = @vpath_build@
62+
abs_top_builddir = @abs_top_builddir@
6263
abs_top_srcdir = @abs_top_srcdir@
6364

6465
ifneq ($(vpath_build),yes)
@@ -316,6 +317,19 @@ BZIP2 = bzip2
316317

317318
# Testing
318319

320+
check: temp-install
321+
322+
.PHONY: temp-install
323+
temp-install:
324+
ifndef NO_TEMP_INSTALL
325+
ifeq ($(MAKELEVEL),0)
326+
rm -rf '$(abs_top_builddir)'/tmp_install
327+
$(MKDIR_P) '$(abs_top_builddir)'/tmp_install/log
328+
$(MAKE) -C '$(top_builddir)' DESTDIR='$(abs_top_builddir)'/tmp_install install >'$(abs_top_builddir)'/tmp_install/log/install.log 2>&1
329+
endif
330+
$(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)
331+
endif
332+
319333
PROVE = @PROVE@
320334
PG_PROVE_FLAGS = -I $(top_srcdir)/src/test/perl/
321335
PROVE_FLAGS = --verbose
@@ -330,6 +344,10 @@ define ld_library_path_var
330344
$(if $(filter $(PORTNAME),darwin),DYLD_LIBRARY_PATH,$(if $(filter $(PORTNAME),aix),LIBPATH,LD_LIBRARY_PATH))
331345
endef
332346

347+
define with_temp_install
348+
PATH="$(abs_top_builddir)/tmp_install$(bindir):$$PATH" $(call add_to_path,$(ld_library_path_var),$(abs_top_builddir)/tmp_install$(libdir))
349+
endef
350+
333351
ifeq ($(enable_tap_tests),yes)
334352

335353
define prove_installcheck

0 commit comments

Comments
 (0)