aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2017-05-12 11:21:20 -0400
committerAndrew Dunstan <andrew@dunslane.net>2017-05-12 11:21:20 -0400
commitcb701af784556e7417bb0d9daa822e913f43b1fa (patch)
treee89b2cbf7df6a4b212e0fb55448ef89b37288319 /src
parent69ce3ead1ebe64989c43be1db12d00cc9341d36a (diff)
downloadpostgresql-cb701af784556e7417bb0d9daa822e913f43b1fa.tar.gz
postgresql-cb701af784556e7417bb0d9daa822e913f43b1fa.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.global.in3
-rw-r--r--src/test/perl/README5
-rw-r--r--src/tools/msvc/vcregress.pl5
3 files changed, 11 insertions, 2 deletions
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 62fc921b801..1c9fc2bb87c 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -335,7 +335,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
diff --git a/src/test/perl/README b/src/test/perl/README
index 710a0d8bc39..4279d316c4d 100644
--- a/src/test/perl/README
+++ b/src/test/perl/README
@@ -14,6 +14,11 @@ src/test/ssl, or should be added to one of the suites for an existing utility.
Note that all tests and test tools should have perltidy run on them before
patches are submitted, using perltidy --profile=src/tools/pgindent/perltidyrc
+By default, to keep the noise low during runs, we do not set any flags via
+PROVE_FLAGS, but this can be done on the 'make' command line if desired, eg:
+
+make check-world PROVE_FLAGS='--verbose'
+
Writing tests
-------------
diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl
index d757e176a7a..dc976d00729 100644
--- a/src/tools/msvc/vcregress.pl
+++ b/src/tools/msvc/vcregress.pl
@@ -180,7 +180,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;