aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.global.in8
-rw-r--r--src/test/perl/TestLib.pm12
2 files changed, 9 insertions, 11 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index b04d0055a35..63ff50b1dca 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -174,6 +174,7 @@ enable_nls = @enable_nls@
enable_debug = @enable_debug@
enable_dtrace = @enable_dtrace@
enable_coverage = @enable_coverage@
+enable_tap_tests = @enable_tap_tests@
enable_thread_safety = @enable_thread_safety@
python_enable_shared = @python_enable_shared@
@@ -310,6 +311,8 @@ define ld_library_path_var
$(if $(filter $(PORTNAME),darwin),DYLD_LIBRARY_PATH,$(if $(filter $(PORTNAME),aix),LIBPATH,LD_LIBRARY_PATH))
endef
+ifeq ($(enable_tap_tests),yes)
+
define prove_installcheck
cd $(srcdir) && TESTDIR='$(CURDIR)' PATH="$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) t/*.pl
endef
@@ -320,6 +323,11 @@ $(MAKE) -C $(top_builddir) DESTDIR='$(CURDIR)'/tmp_check/install install >'$(CUR
cd $(srcdir) && TESTDIR='$(CURDIR)' PATH="$(CURDIR)/tmp_check/install$(bindir):$$PATH" $(call add_to_path,$(ld_library_path_var),$(CURDIR)/tmp_check/install$(libdir)) PGPORT='6$(DEF_PGPORT)' $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS) t/*.pl
endef
+else
+prove_installcheck = @echo "TAP tests not enabled"
+prove_check = $(prove_installcheck)
+endif
+
# Installation.
install_bin = @install_bin@
diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm
index cdb5e31c362..46a8bece1e5 100644
--- a/src/test/perl/TestLib.pm
+++ b/src/test/perl/TestLib.pm
@@ -25,19 +25,9 @@ our @EXPORT = qw(
use Cwd;
use File::Spec;
use File::Temp ();
+use IPC::Run qw(run start);
use Test::More;
-BEGIN
-{
- eval {
- require IPC::Run;
- import IPC::Run qw(run start);
- 1;
- } or do
- {
- plan skip_all => "IPC::Run not available";
- };
-}
# Set to untranslated messages, to be able to compare program output
# with expected strings.