aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2021-12-15 10:40:15 +0900
committerMichael Paquier <michael@paquier.xyz>2021-12-15 10:40:15 +0900
commitf04aa65daf597e2f9eb1e79c553c62adbbe3b897 (patch)
tree1708651f82fe0425315d9d2f410c61b11e8f3357 /src
parent65af1e842208cf3edec3b74842eec87b4a0138e5 (diff)
downloadpostgresql-f04aa65daf597e2f9eb1e79c553c62adbbe3b897.tar.gz
postgresql-f04aa65daf597e2f9eb1e79c553c62adbbe3b897.zip
Adjust behavior of some env settings for the TAP tests of MSVC
edc2332 has introduced in vcregress.pl some control on the environment variables LZ4, TAR and GZIP_PROGRAM to allow any TAP tests to be able use those commands. This makes the settings more consistent with src/Makefile.global.in, as the same default gets used for Make and MSVC builds. Each parameter can be changed in buildenv.pl, but as a default gets assigned after loading buldenv.pl, it is not possible to unset any of these, and using an empty value would not work with "||=" either. As some environments may not have a compatible command in their PATH (tar coming from MinGW is an issue, for one), this could break tests without an exit path to bypass any failing test. This commit changes things so as the default values for LZ4, TAR and GZIP_PROGRAM are assigned before loading buildenv.pl, not after. This way, we keep the same amount of compatibility as a GNU build with the same defaults, and it becomes possible to unset any of those values. While on it, this adds some documentation about those three variables in the section dedicated to the TAP tests for MSVC. Per discussion with Andrew Dunstan. Discussion: https://postgr.es/m/YbGYe483803il3X7@paquier.xyz Backpatch-through: 10
Diffstat (limited to 'src')
-rw-r--r--src/tools/msvc/vcregress.pl14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl
index 53ac44d54b9..e0909aa1aea 100644
--- a/src/tools/msvc/vcregress.pl
+++ b/src/tools/msvc/vcregress.pl
@@ -26,6 +26,13 @@ my $tmp_installdir = "$topdir/tmp_install";
do './src/tools/msvc/config_default.pl';
do './src/tools/msvc/config.pl' if (-f 'src/tools/msvc/config.pl');
+# These values are defaults that can be overridden by the calling environment
+# (see buildenv.pl processing below).
+# c.f. src/Makefile.global.in and configure.ac
+$ENV{GZIP_PROGRAM} ||= 'gzip';
+$ENV{LZ4} ||= 'lz4';
+$ENV{TAR} ||= 'tar';
+
# buildenv.pl is for specifying the build environment settings
# it should contain lines like:
# $ENV{PATH} = "c:/path/to/bison/bin;$ENV{PATH}";
@@ -63,13 +70,6 @@ $ENV{with_gssapi} = $config->{gss} ? 'yes' : 'no';
$ENV{with_krb_srvnam} = $config->{krb_srvnam} || 'postgres';
$ENV{with_readline} = 'no';
-# These values are defaults that can be overridden by the calling environment
-# (see buildenv.pl processing above).
-# c.f. src/Makefile.global.in and configure.ac
-$ENV{TAR} ||= 'tar';
-$ENV{LZ4} ||= 'lz4';
-$ENV{GZIP_PROGRAM} ||= 'gzip';
-
$ENV{PATH} = "$topdir/$Config/libpq;$ENV{PATH}";
if ($ENV{PERL5LIB})