On Wed, Mar 2, 2016 at 12:40 AM, Andrew Dunstan <and...@dunslane.net> wrote:
> On 03/01/2016 08:00 AM, Michael Paquier wrote:
>> As of now the MSVC scripts control if TAP tests are enabled or not
>> using a boolean flag as $config->{tap_tests}. However, this flag is
>> just taken into account in vcregress.pl, with the following issues:
>> 1) config_default.pl does not list tap_tests, so it is unclear to
>> users to enable them. People need to look into vcregress.pl as a start
>> point.
>> 2) GetFakeConfigure() does not translate $config->{tap_tests} into
>> --enable-tap-tests, leading to pg_config not reporting it in
>> CONFIGURE. This is inconsistent with what is done in ./configure.
>>
>> Attached is a patch to address those two issues.
>
> Good work. There seem to be some unrelated whitespace changes. Shouldn't
> this just be two extra lines?

pertidy is telling me the contrary. Is that bad to run it for such a
change? I thought we cared about the format of the perl code, and the
length of the variable name "tap_tests" has an impact on the
indentation of the whole block per the rules in
src/tools/pgindent/perltidyrc. (Actually I made a mistake in previous
patch the portion for asserts should not be indented, not sure why it
was, attached is an updated patch).
-- 
Michael
From 3fd1f0a883954173c8f22722ffbf82748f3b6748 Mon Sep 17 00:00:00 2001
From: Michael Paquier <mich...@otacoo.com>
Date: Mon, 22 Feb 2016 14:29:45 +0000
Subject: [PATCH] Fix handling of --enable-tap-tests in MSVC scripts

MSVC build scripts use a boolean flag called tap_tests to track if TAP
tests are supported or not but this variable is only referenced in
vcregress.pl, causing the following problems:
1) config_default.pl does not list this parameter, users need to look
directly at vcregress.pl to check how to enable TAP tests
2) GetFakeConfigure() does not set --enable-tap-tests, leading to
pg_config not listing it in its variable CONFIGURE should users enable
this set of tests.
---
 src/tools/msvc/Solution.pm       |  1 +
 src/tools/msvc/config_default.pl | 25 +++++++++++++------------
 2 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm
index ac116b7..c5a43f9 100644
--- a/src/tools/msvc/Solution.pm
+++ b/src/tools/msvc/Solution.pm
@@ -643,6 +643,7 @@ sub GetFakeConfigure
 	$cfg .= ' --enable-integer-datetimes'
 	  if ($self->{options}->{integer_datetimes});
 	$cfg .= ' --enable-nls' if ($self->{options}->{nls});
+	$cfg .= ' --enable-tap-tests' if ($self->{options}->{tap_tests});
 	$cfg .= ' --with-ldap'  if ($self->{options}->{ldap});
 	$cfg .= ' --without-zlib' unless ($self->{options}->{zlib});
 	$cfg .= ' --with-extra-version' if ($self->{options}->{extraver});
diff --git a/src/tools/msvc/config_default.pl b/src/tools/msvc/config_default.pl
index b9f2ff4..66d0d8c 100644
--- a/src/tools/msvc/config_default.pl
+++ b/src/tools/msvc/config_default.pl
@@ -13,18 +13,19 @@ our $config = {
 	# blocksize => 8,         # --with-blocksize, 8kB by default
 	# wal_blocksize => 8,     # --with-wal-blocksize, 8kB by default
 	# wal_segsize => 16,      # --with-wal-segsize, 16MB by default
-	ldap     => 1,        # --with-ldap
-	extraver => undef,    # --with-extra-version=<string>
-	nls      => undef,    # --enable-nls=<path>
-	tcl      => undef,    # --with-tls=<path>
-	perl     => undef,    # --with-perl
-	python   => undef,    # --with-python=<path>
-	openssl  => undef,    # --with-openssl=<path>
-	uuid     => undef,    # --with-ossp-uuid
-	xml      => undef,    # --with-libxml=<path>
-	xslt     => undef,    # --with-libxslt=<path>
-	iconv    => undef,    # (not in configure, path to iconv)
-	zlib     => undef     # --with-zlib=<path>
+	ldap      => 1,        # --with-ldap
+	extraver  => undef,    # --with-extra-version=<string>
+	nls       => undef,    # --enable-nls=<path>
+	tap_tests => undef,    # --enable-tap-tests
+	tcl       => undef,    # --with-tls=<path>
+	perl      => undef,    # --with-perl
+	python    => undef,    # --with-python=<path>
+	openssl   => undef,    # --with-openssl=<path>
+	uuid      => undef,    # --with-ossp-uuid
+	xml       => undef,    # --with-libxml=<path>
+	xslt      => undef,    # --with-libxslt=<path>
+	iconv     => undef,    # (not in configure, path to iconv)
+	zlib      => undef     # --with-zlib=<path>
 };
 
 1;
-- 
2.7.2

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to