Enable settings used in TAP tests for MSVC builds
authorAndrew Dunstan
Tue, 7 Dec 2021 19:53:39 +0000 (14:53 -0500)
committerAndrew Dunstan
Tue, 7 Dec 2021 20:01:16 +0000 (15:01 -0500)
Certain settings from configuration or the Makefile infrastructure are
used by the TAP tests, but were not being set up by vcregress.pl. This
remedies those omissions. This should increase test coverage, especially
on the buildfarm.

Reviewed by Noah Misch

Discussion: https://postgr.es/m/17093da5-e40d-8335-d53a-2bd803fc38b0@dunslane.net

Backpatch to all live branches.

src/tools/msvc/vcregress.pl

index fc826da3ff2f54eed84bbd075a523c4d01527560..9e85849050b9c3079c8bfbb4a7fab55dafc46413 100644 (file)
@@ -59,6 +59,21 @@ copy("$Config/autoinc/autoinc.dll",               "src/test/regress");
 copy("$Config/regress/regress.dll",               "src/test/regress");
 copy("$Config/dummy_seclabel/dummy_seclabel.dll", "src/test/regress");
 
+# Configuration settings used by TAP tests
+$ENV{with_ssl} = $config->{openssl} ? 'openssl' : 'no';
+$ENV{with_ldap} = $config->{ldap} ? 'yes' : 'no';
+$ENV{with_icu} = $config->{icu} ? 'yes' : 'no';
+$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})