Skip to content

Commit cb701af

Browse files
committed
Honor PROVE_FLAGS environment setting
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
1 parent 69ce3ea commit cb701af

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

src/Makefile.global.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -335,7 +335,8 @@ PROVE = @PROVE@
335335
# There are common routines in src/test/perl, and some test suites have
336336
# extra perl modules in their own directory.
337337
PG_PROVE_FLAGS = -I $(top_srcdir)/src/test/perl/ -I $(srcdir)
338-
PROVE_FLAGS = --verbose
338+
# User-supplied prove flags such as --verbose can be provided in PROVE_FLAGS.
339+
339340

340341
# prepend to path if already set, else just set it
341342
define add_to_path

src/test/perl/README

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ src/test/ssl, or should be added to one of the suites for an existing utility.
1414
Note that all tests and test tools should have perltidy run on them before
1515
patches are submitted, using perltidy --profile=src/tools/pgindent/perltidyrc
1616

17+
By default, to keep the noise low during runs, we do not set any flags via
18+
PROVE_FLAGS, but this can be done on the 'make' command line if desired, eg:
19+
20+
make check-world PROVE_FLAGS='--verbose'
21+
1722
Writing tests
1823
-------------
1924

src/tools/msvc/vcregress.pl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,10 @@ sub tap_check
180180
my $dir = shift;
181181
chdir $dir;
182182

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

185188
# adjust the environment for just this test
186189
local %ENV = %ENV;

0 commit comments

Comments
 (0)