aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2014-11-02 09:14:36 -0500
committerPeter Eisentraut <peter_e@gmx.net>2014-11-02 09:17:26 -0500
commita409b464f91e0bdf61f2b3fb81218a0e4312987b (patch)
treeb7faadd7685e00be9d244da2a252e71a7d24f2bb /src
parent3e81a33d799ed8c12847eb8ef1685563eeb10e7d (diff)
downloadpostgresql-a409b464f91e0bdf61f2b3fb81218a0e4312987b.tar.gz
postgresql-a409b464f91e0bdf61f2b3fb81218a0e4312987b.zip
Add configure --enable-tap-tests option
Don't skip the TAP tests anymore when IPC::Run is not found. This will fail normally now.
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.