aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2017-06-10 10:19:06 -0400
committerAndrew Dunstan <andrew@dunslane.net>2017-06-10 10:23:43 -0400
commit6b2a0b4757331612f379d497c377b58f9a0ca24f (patch)
tree91c0e9aad3907471f363b550eade3666b0064d72
parentc02c450cfc0ff2fa85f7bbef61b850ec2be61dd5 (diff)
downloadpostgresql-6b2a0b4757331612f379d497c377b58f9a0ca24f.tar.gz
postgresql-6b2a0b4757331612f379d497c377b58f9a0ca24f.zip
Take PROVE_FLAGS from the command line but not the environment
This reverts commit 56b6ef893fee9e9bf47d927a02f4d1ea911f4d9c 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.
-rw-r--r--src/Makefile.global.in2
-rw-r--r--src/tools/msvc/vcregress.pl12
2 files changed, 10 insertions, 4 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 54bdf7e2f2c..b4c38e2f82d 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -321,7 +321,7 @@ PROVE = @PROVE@
# extra perl modules in their own directory.
PG_PROVE_FLAGS = -I $(top_srcdir)/src/test/perl/ -I $(srcdir)
# User-supplied prove flags such as --verbose can be provided in PROVE_FLAGS.
-
+PROVE_FLAGS =
# prepend to path if already set, else just set it
define add_to_path
diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl
index b54bcd43532..8265aef2b78 100644
--- a/src/tools/msvc/vcregress.pl
+++ b/src/tools/msvc/vcregress.pl
@@ -174,12 +174,18 @@ sub tap_check
die "Tap tests not enabled in configuration"
unless $config->{tap_tests};
+ my @flags;
+ foreach my $arg (0 .. scalar(@_))
+ {
+ next unless $_[$arg] =~ /^PROVE_FLAGS=(.*)/;
+ @flags = split(/\s+/, $1);
+ splice(@_,$arg,1);
+ last;
+ }
+
my $dir = shift;
chdir $dir;
- 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