Skip to content

Commit 93b7d97

Browse files
committed
Take PROVE_FLAGS from the command line but not the environment
This reverts commit 56b6ef8 and instead makes vcregress.pl parse out PROVE_FLAGS from a command line argument when doing a TAP test, thus making it consistent with the makefile treatment. Discussion: https://postgr.es/m/c26a7416-2fb9-34ab-7991-618c922f896e%402ndquadrant.com Backpatch to 9.4 like previous patch.
1 parent e20f679 commit 93b7d97

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

src/Makefile.global.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ PROVE = @PROVE@
340340
# extra perl modules in their own directory.
341341
PG_PROVE_FLAGS = -I $(top_srcdir)/src/test/perl/ -I $(srcdir)
342342
# User-supplied prove flags such as --verbose can be provided in PROVE_FLAGS.
343-
343+
PROVE_FLAGS =
344344

345345
# prepend to path if already set, else just set it
346346
define add_to_path

src/tools/msvc/vcregress.pl

+9-3
Original file line numberDiff line numberDiff line change
@@ -178,12 +178,18 @@ sub tap_check
178178
die "Tap tests not enabled in configuration"
179179
unless $config->{tap_tests};
180180

181+
my @flags;
182+
foreach my $arg (0 .. scalar(@_))
183+
{
184+
next unless $_[$arg] =~ /^PROVE_FLAGS=(.*)/;
185+
@flags = split(/\s+/, $1);
186+
splice(@_,$arg,1);
187+
last;
188+
}
189+
181190
my $dir = shift;
182191
chdir $dir;
183192

184-
my @flags;
185-
@flags = split(/\s+/, $ENV{PROVE_FLAGS}) if exists $ENV{PROVE_FLAGS};
186-
187193
my @args = ("prove", @flags, "t/*.pl");
188194

189195
# adjust the environment for just this test

0 commit comments

Comments
 (0)