Skip to content

Commit c3a0818

Browse files
committed
Install TAP test infrastructure so it's available for extension testing.
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>
1 parent 5a7bae0 commit c3a0818

File tree

3 files changed

+36
-2
lines changed

3 files changed

+36
-2
lines changed

src/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ SUBDIRS = \
2626
bin \
2727
pl \
2828
makefiles \
29-
test/regress
29+
test/regress \
30+
test/perl
3031

3132
# There are too many interdependencies between the subdirectories, so
3233
# don't attempt parallel make here.

src/test/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ subdir = src/test
1212
top_builddir = ../..
1313
include $(top_builddir)/src/Makefile.global
1414

15-
SUBDIRS = regress isolation modules recovery
15+
SUBDIRS = perl regress isolation modules recovery
1616

1717
# We don't build or execute examples/, locale/, or thread/ by default,
1818
# but we do want "make clean" etc to recurse into them. Likewise for ssl/,

src/test/perl/Makefile

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#-------------------------------------------------------------------------
2+
#
3+
# Makefile for src/test/perl
4+
#
5+
# Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group
6+
# Portions Copyright (c) 1994, Regents of the University of California
7+
#
8+
# src/test/perl/Makefile
9+
#
10+
#-------------------------------------------------------------------------
11+
12+
subdir = src/test/perl
13+
top_builddir = ../../..
14+
include $(top_builddir)/src/Makefile.global
15+
16+
ifeq ($(enable_tap_tests),yes)
17+
18+
installdirs:
19+
$(MKDIR_P) '$(DESTDIR)$(pgxsdir)/$(subdir)'
20+
21+
install: all installdirs
22+
$(INSTALL_DATA) $(srcdir)/TestLib.pm '$(DESTDIR)$(pgxsdir)/$(subdir)/TestLib.pm'
23+
$(INSTALL_DATA) $(srcdir)/SimpleTee.pm '$(DESTDIR)$(pgxsdir)/$(subdir)/SimpleTee.pm'
24+
$(INSTALL_DATA) $(srcdir)/RecursiveCopy.pm '$(DESTDIR)$(pgxsdir)/$(subdir)/RecursiveCopy.pm'
25+
$(INSTALL_DATA) $(srcdir)/PostgresNode.pm '$(DESTDIR)$(pgxsdir)/$(subdir)/PostgresNode.pm'
26+
27+
uninstall:
28+
rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/TestLib.pm'
29+
rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/SimpleTee.pm'
30+
rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/RecursiveCopy.pm'
31+
rm -f '$(DESTDIR)$(pgxsdir)/$(subdir)/PostgresNode.pm'
32+
33+
endif

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy