Honor PROVE_FLAGS environment setting
authorAndrew Dunstan <andrew@dunslane.net>
Fri, 12 May 2017 15:21:20 +0000 (11:21 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Fri, 12 May 2017 15:27:56 +0000 (11:27 -0400)
On MSVC builds and on back branches that means removing the hardcoded
--verbose setting. On master for Unix that means removing the empty
setting in the global Makefile so that the value can be acquired from
the environment as well as from the make arguments.

Backpatch to 9.4 where we introduced TAP tests

src/Makefile.global.in
src/tools/msvc/vcregress.pl

index 71391ad2868c2372cfc5f3d5ed987906b23bb9ff..54bdf7e2f2cd563d658a8d3d0e7c5bc0b036a7e5 100644 (file)
@@ -320,7 +320,8 @@ PROVE = @PROVE@
 # There are common routines in src/test/perl, and some test suites have
 # extra perl modules in their own directory.
 PG_PROVE_FLAGS = -I $(top_srcdir)/src/test/perl/ -I $(srcdir)
-PROVE_FLAGS = --verbose
+# User-supplied prove flags such as --verbose can be provided in PROVE_FLAGS.
+
 
 # prepend to path if already set, else just set it
 define add_to_path
index 0e96d03aa291cf301e4b74d6d86a7ebc90de65d4..b54bcd43532fd38a4a98b15593a5c23f4f2c0237 100644 (file)
@@ -177,7 +177,10 @@ sub tap_check
    my $dir = shift;
    chdir $dir;
 
-   my @args = ( "prove", "--verbose", "t/*.pl");
+   my @flags;
+   @flags = split(/\s+/,$ENV{PROVE_FLAGS}) if exists $ENV{PROVE_FLAGS};
+
+   my @args = ("prove", @flags, "t/*.pl");
 
    # adjust the environment for just this test
    local %ENV = %ENV;