Adjust behavior of some env settings for the TAP tests of MSVC
authorMichael Paquier <[email protected]>
Wed, 15 Dec 2021 01:40:22 +0000 (10:40 +0900)
committerMichael Paquier <[email protected]>
Wed, 15 Dec 2021 01:40:22 +0000 (10:40 +0900)
commitf2e4bbf408cfb903530b86c7bb4ef10413a23d30
tree6f3b9d6ee3834ddac53a634d48e81256958228a7
parentdbc5cdd5cbb8b9f98b880c0e49d613729bf1b839
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/[email protected]
Backpatch-through: 10
doc/src/sgml/install-windows.sgml
src/tools/msvc/vcregress.pl