]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Install TAP test infrastructure so it's available for extension testing.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 23 Sep 2016 19:50:00 +0000 (15:50 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 23 Sep 2016 19:50:00 +0000 (15:50 -0400)
When configured with --enable-tap-tests, "make install" will now install
the Perl support files for TAP testing where PGXS will find them.
This allows extensions to rely on $(prove_check) even when being built
out-of-tree.  Back-patch to 9.4 where we first started to support TAP
testing, to reduce the number of cases extension makefiles need to
consider.

Craig Ringer

Discussion: <CAMsr+YFXv+2qne6xJW7z_25mYBtktRX5rpkrgrb+DRgQ_FxgHQ@mail.gmail.com>

src/Makefile
src/test/Makefile
src/test/perl/Makefile [new file with mode: 0644]

index e859826dc4fd66888f3f0f49e01f4d48ce4bd68b..b179ffcae871e74a90749a1e75f63fad2349798e 100644 (file)
@@ -25,7 +25,8 @@ SUBDIRS = \
        bin \
        pl \
        makefiles \
-       test/regress
+       test/regress \
+       test/perl
 
 # There are too many interdependencies between the subdirectories, so
 # don't attempt parallel make here.
index b713c2c9c64a54bad8950c342afe119dd4e779e9..777b2ba94a2f9b929a16f4b7fc1a2a2218ec960f 100644 (file)
@@ -12,7 +12,7 @@ subdir = src/test
 top_builddir = ../..
 include $(top_builddir)/src/Makefile.global
 
-SUBDIRS = regress isolation modules
+SUBDIRS = perl regress isolation modules
 
 # We don't build or execute examples/, locale/, or thread/ by default,
 # but we do want "make clean" etc to recurse into them.  Likewise for ssl/,
diff --git a/src/test/perl/Makefile b/src/test/perl/Makefile
new file mode 100644 (file)
index 0000000..1a1583b
--- /dev/null
@@ -0,0 +1,29 @@
+#-------------------------------------------------------------------------
+#
+# Makefile for src/test/perl
+#
+# Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
+# Portions Copyright (c) 1994, Regents of the University of California
+#
+# src/test/perl/Makefile
+#
+#-------------------------------------------------------------------------
+
+subdir = src/test/perl
+top_builddir = ../../..
+include $(top_builddir)/src/Makefile.global
+
+ifeq ($(enable_tap_tests),yes)
+
+installdirs:
+       $(MKDIR_P) '$(DESTDIR)$(pgxsdir)/$(subdir)'
+
+install: all installdirs
+       $(INSTALL_DATA) $(srcdir)/TestLib.pm '$(DESTDIR)$(pgxsdir)/$(subdir)/TestLib.pm'
+       $(INSTALL_DATA) $(srcdir)/SimpleTee.pm '$(DESTDIR)$(pgxsdir)/$(subdir)/SimpleTee.pm'
+
+uninstall:
+       rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/TestLib.pm'
+       rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/SimpleTee.pm'
+
+endif