mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-02-05 19:09:58 +08:00
Take PROVE_FLAGS from the command line but not the environment
This reverts commit 56b6ef893f
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.
This commit is contained in:
parent
e20f679f66
commit
93b7d9731f
@ -340,7 +340,7 @@ PROVE = @PROVE@
|
|||||||
# extra perl modules in their own directory.
|
# extra perl modules in their own directory.
|
||||||
PG_PROVE_FLAGS = -I $(top_srcdir)/src/test/perl/ -I $(srcdir)
|
PG_PROVE_FLAGS = -I $(top_srcdir)/src/test/perl/ -I $(srcdir)
|
||||||
# User-supplied prove flags such as --verbose can be provided in PROVE_FLAGS.
|
# 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
|
# prepend to path if already set, else just set it
|
||||||
define add_to_path
|
define add_to_path
|
||||||
|
@ -178,12 +178,18 @@ sub tap_check
|
|||||||
die "Tap tests not enabled in configuration"
|
die "Tap tests not enabled in configuration"
|
||||||
unless $config->{tap_tests};
|
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;
|
my $dir = shift;
|
||||||
chdir $dir;
|
chdir $dir;
|
||||||
|
|
||||||
my @flags;
|
|
||||||
@flags = split(/\s+/, $ENV{PROVE_FLAGS}) if exists $ENV{PROVE_FLAGS};
|
|
||||||
|
|
||||||
my @args = ("prove", @flags, "t/*.pl");
|
my @args = ("prove", @flags, "t/*.pl");
|
||||||
|
|
||||||
# adjust the environment for just this test
|
# adjust the environment for just this test
|
||||||
|
Loading…
Reference in New Issue
Block a user