pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
contribcheck and modulescheck of MSVC's vcregress.pl cannot work independently
9+ messages / 3 participants
[nested] [flat]

* contribcheck and modulescheck of MSVC's vcregress.pl cannot work independently
@ 2015-06-01 05:49  Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 2 replies; 9+ messages in thread

From: Michael Paquier @ 2015-06-01 05:49 UTC (permalink / raw)
  To: pgsql-bugs; +Cc: Andrew Dunstan <andrew@dunslane.net>

Hi all,

I have just noticed that the commands contribcheck and modulescheck
will fail as follows if the temporary installation is not done in
$ROOT_DIR/tmp_install first:
C:\Users\ioltas\git\postgres\src\tools\msvc>vcregress contribcheck
============================================================
Checking btree_gin
The system cannot find the path specified.

All the other commands call InstallTemp() so as to have them work
independently. For consistency I think that we should do the same for
them. Attached is a patch to fix that.
Regards,
-- 
Michael

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

Attachments:

20150601_vcregress_fix.patch (text/x-patch, 459B) download diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index ddb628d..6196383 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -290,6 +290,7 @@ sub subdircheck sub contribcheck { + InstallTemp(); chdir "$topdir/contrib"; foreach my $module (glob("*")) { @@ -309,6 +310,7 @@ sub contribcheck sub modulescheck { + InstallTemp(); chdir "$topdir/src/test/modules"; foreach my $module (glob("*")) {
^ permalink raw reply [nested|flat] 9+ messages in thread

* Re: contribcheck and modulescheck of MSVC's vcregress.pl cannot work independently
@ 2015-06-01 15:31  Andrew Dunstan <andrew@dunslane.net>
  parent: Michael Paquier <michael.paquier@gmail.com>
  1 sibling, 0 replies; 9+ messages in thread

From: Andrew Dunstan @ 2015-06-01 15:31 UTC (permalink / raw)
  To: Michael Paquier <michael.paquier@gmail.com>; pgsql-bugs


On 06/01/2015 01:49 AM, Michael Paquier wrote:
> Hi all,
>
> I have just noticed that the commands contribcheck and modulescheck
> will fail as follows if the temporary installation is not done in
> $ROOT_DIR/tmp_install first:
> C:\Users\ioltas\git\postgres\src\tools\msvc>vcregress contribcheck
> ============================================================
> Checking btree_gin
> The system cannot find the path specified.
>
> All the other commands call InstallTemp() so as to have them work
> independently. For consistency I think that we should do the same for
> them. Attached is a patch to fix that.


Seems reasonable. I'll take a look.

cheers

andrew


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



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: contribcheck and modulescheck of MSVC's vcregress.pl cannot work independently
@ 2015-07-04 01:37  Noah Misch <noah@leadboat.com>
  parent: Michael Paquier <michael.paquier@gmail.com>
  1 sibling, 1 reply; 9+ messages in thread

From: Noah Misch @ 2015-07-04 01:37 UTC (permalink / raw)
  To: Michael Paquier <michael.paquier@gmail.com>; Andrew Dunstan <andrew@dunslane.net>; +Cc: pgsql-bugs; peter_e@gmx.net

On Sun, May 31, 2015 at 10:49:46PM -0700, Michael Paquier wrote:
> I have just noticed that the commands contribcheck and modulescheck
> will fail as follows if the temporary installation is not done in
> $ROOT_DIR/tmp_install first:
> C:\Users\ioltas\git\postgres\src\tools\msvc>vcregress contribcheck
> ============================================================
> Checking btree_gin
> The system cannot find the path specified.
> 
> All the other commands call InstallTemp() so as to have them work
> independently. For consistency I think that we should do the same for
> them. Attached is a patch to fix that.

> --- a/src/tools/msvc/vcregress.pl
> +++ b/src/tools/msvc/vcregress.pl
> @@ -290,6 +290,7 @@ sub subdircheck
>  
>  sub contribcheck
>  {
> +	InstallTemp();

This worked around defects in commit dcae5fa: "check", "ecpgcheck" and
"upgradecheck" are the only test targets properly requiring an installation.
The others are installcheck-style targets that need just a couple of binaries
from the build tree; they should be using --bindir=<relpath>/$Config/psql like
installcheck itself.


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



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: contribcheck and modulescheck of MSVC's vcregress.pl cannot work independently
@ 2015-07-04 02:26  Michael Paquier <michael.paquier@gmail.com>
  parent: Noah Misch <noah@leadboat.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Michael Paquier @ 2015-07-04 02:26 UTC (permalink / raw)
  To: Noah Misch <noah@leadboat.com>; +Cc: Andrew Dunstan <andrew@dunslane.net>; pgsql-bugs; peter_e@gmx.net

On Sat, Jul 4, 2015 at 10:37 AM, Noah Misch wrote:
> This worked around defects in commit dcae5fa: "check", "ecpgcheck" and
> "upgradecheck" are the only test targets properly requiring an installation.
> The others are installcheck-style targets that need just a couple of binaries
> from the build tree; they should be using --bindir=<relpath>/$Config/psql like
> installcheck itself.

Well, I disagree here. For one, that's a cheap insurance regarding the
fact that a test set may need more than psql as a binary and it makes
all the tests use the same consistent way of doing. Also, if we would
want to have a real installcheck mode, what we should use is not the
path to what has been built but the path to the installation that the
Postgres instance needed is using. Now if you want to fix it if you
fix that's incorrect I won't complain about that :)

Hence, perhaps that a complete answer is to actually gulp completely the bullet:
- Make installcheck look for pg_config in PATH, and use it to
determine where are the builds. Give as well the option for user to
define a custom path at will.
- Switch all the targets to create by themselves a Postgres instance
similarly to the normal Make (I have always found troublesome that it
is necessary to install contrib/ when wanting to test them, and to
start a Postgres service).
- Create an allcheck target, that will kick all the targets, except
installcheck.
- And an allinstallcheck target that will use an existing instance for
all the targets, with installcheck.
If we can give up on installcheck, I think that we should as well be
able to pass an option "use the existing instance" using an option in
vcregress.pl.
I don't think that this is more than a couple of hours of work, and
will be happy to send a patch for 9.6 if people like those ideas.
Regards,
-- 
Michael


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



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: contribcheck and modulescheck of MSVC's vcregress.pl cannot work independently
@ 2015-07-07 05:04  Noah Misch <noah@leadboat.com>
  parent: Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Noah Misch @ 2015-07-07 05:04 UTC (permalink / raw)
  To: Michael Paquier <michael.paquier@gmail.com>; +Cc: Andrew Dunstan <andrew@dunslane.net>; pgsql-bugs; peter_e@gmx.net

On Sat, Jul 04, 2015 at 11:26:07AM +0900, Michael Paquier wrote:
> On Sat, Jul 4, 2015 at 10:37 AM, Noah Misch wrote:
> > This worked around defects in commit dcae5fa: "check", "ecpgcheck" and
> > "upgradecheck" are the only test targets properly requiring an installation.
> > The others are installcheck-style targets that need just a couple of binaries
> > from the build tree; they should be using --bindir=<relpath>/$Config/psql like
> > installcheck itself.
> 
> Well, I disagree here. For one, that's a cheap insurance regarding the
> fact that a test set may need more than psql as a binary and it makes
> all the tests use the same consistent way of doing.

At several seconds and >1000 files created, an extra temporary installation is
not cheap.  (Indeed, that expense motivated commit dcae5fa.)  The GNU make
build system never creates a temporary installation for just psql.  Insurance
is not valuable in this area.  If someone modifies a suite to need an
additional binary without updating the test harness to furnish that binary,
the buildfarm will catch the mistake.

MSVC build system semantics should mimic the GNU make build system, not
innovate.  In released versions, vcregress.pl departs from that by using the
build tree psql instead of an installed psql.  In 9.5, it will use psql from a
temporary installation.  Where's the improvement in that?  It replaced one
inconsistency with another.

> Also, if we would
> want to have a real installcheck mode, what we should use is not the
> path to what has been built but the path to the installation that the
> Postgres instance needed is using. Now if you want to fix it if you
> fix that's incorrect I won't complain about that :)

I don't wish to.  I was content with released-branch vcregress.pl semantics.


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



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: contribcheck and modulescheck of MSVC's vcregress.pl cannot work independently
@ 2015-07-07 06:53  Michael Paquier <michael.paquier@gmail.com>
  parent: Noah Misch <noah@leadboat.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Michael Paquier @ 2015-07-07 06:53 UTC (permalink / raw)
  To: Noah Misch <noah@leadboat.com>; +Cc: Andrew Dunstan <andrew@dunslane.net>; pgsql-bugs; peter_e@gmx.net

On Mon, Jul 6, 2015 at 10:04 PM, Noah Misch wrote:
>> Also, if we would
>> want to have a real installcheck mode, what we should use is not the
>> path to what has been built but the path to the installation that the
>> Postgres instance needed is using. Now if you want to fix it if you
>> fix that's incorrect I won't complain about that :)
>
> I don't wish to.  I was content with released-branch vcregress.pl semantics.

Attached is a patch to revert to the pre-9.4 way of doing... If MSVC
should imitate what make does, perhaps you have an opinion about the
ideas I sent upthead to add a check-mode to contribcheck and
modulescheck? That's 9.6 work.
-- 
Michael

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

Attachments:

20150706_light_tempinstall.patch (text/x-diff, 1.5K) download diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index 6196383..cfbdea1 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -158,12 +158,11 @@ sub isolationcheck { chdir $startdir; - InstallTemp(); chdir "${topdir}/src/test/isolation"; my @args = ( "${tmp_installdir}/bin/pg_isolation_regress", - "--bindir=${tmp_installdir}/bin", + "--bindir=${topdir}/${Config}/psql", "--inputdir=.", "--schedule=./isolation_schedule"); push(@args, $maxconn) if $maxconn; @@ -176,7 +175,6 @@ sub plcheck { chdir $startdir; - InstallTemp(); chdir "${topdir}/src/pl"; foreach my $pl (glob("*")) @@ -215,7 +213,7 @@ sub plcheck print "Checking $lang\n"; my @args = ( "${tmp_installdir}/bin/pg_regress", - "--bindir=${tmp_installdir}/bin", + "--bindir=${topdir}/${Config}/psql", "--dbname=pl_regression", @lang_args, @tests); system(@args); my $status = $? >> 8; @@ -278,7 +276,7 @@ sub subdircheck print "Checking $module\n"; my @args = ( "${tmp_installdir}/bin/pg_regress", - "--bindir=${tmp_installdir}/bin", + "--bindir=${topdir}/${Config}/psql", "--dbname=contrib_regression", @opts, @tests); system(@args); my $status = $? >> 8; @@ -290,7 +288,6 @@ sub subdircheck sub contribcheck { - InstallTemp(); chdir "$topdir/contrib"; foreach my $module (glob("*")) { @@ -310,7 +307,6 @@ sub contribcheck sub modulescheck { - InstallTemp(); chdir "$topdir/src/test/modules"; foreach my $module (glob("*")) {
^ permalink raw reply [nested|flat] 9+ messages in thread

* Re: contribcheck and modulescheck of MSVC's vcregress.pl cannot work independently
@ 2015-07-12 06:57  Noah Misch <noah@leadboat.com>
  parent: Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Noah Misch @ 2015-07-12 06:57 UTC (permalink / raw)
  To: Michael Paquier <michael.paquier@gmail.com>; +Cc: Andrew Dunstan <andrew@dunslane.net>; pgsql-bugs; peter_e@gmx.net

On Mon, Jul 06, 2015 at 11:53:58PM -0700, Michael Paquier wrote:
> On Mon, Jul 6, 2015 at 10:04 PM, Noah Misch wrote:
> >> Also, if we would
> >> want to have a real installcheck mode, what we should use is not the
> >> path to what has been built but the path to the installation that the
> >> Postgres instance needed is using. Now if you want to fix it if you
> >> fix that's incorrect I won't complain about that :)
> >
> > I don't wish to.  I was content with released-branch vcregress.pl semantics.
> 
> Attached is a patch to revert to the pre-9.4 way of doing...

This is a start.  Study "git diff REL9_4_STABLE src/tools/msvc/vcregress.pl"
after applying it.  To give just one example of material left to revert, it
leaves two absolute-path "chdir" calls in a row.

> If MSVC
> should imitate what make does, perhaps you have an opinion about the
> ideas I sent upthead to add a check-mode to contribcheck and
> modulescheck? That's 9.6 work.

As you note, we lack a predefined notion of the installation path like we have
in the GNU make build.  That challenges our ability to make the two build
systems more similar than they are in 9.4.  While I have occasionally wished
for a vcregress.pl target corresponding to "make -C contrib check", it's also
one more thing to bitrot in an area that already experiences too much bitrot.
Overall, I recommend against this project.  The benefits of a correct patch
are slight, yet writing one is difficult.


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



^ permalink  raw  reply  [nested|flat] 9+ messages in thread

* Re: contribcheck and modulescheck of MSVC's vcregress.pl cannot work independently
@ 2015-07-12 12:50  Michael Paquier <michael.paquier@gmail.com>
  parent: Noah Misch <noah@leadboat.com>
  0 siblings, 1 reply; 9+ messages in thread

From: Michael Paquier @ 2015-07-12 12:50 UTC (permalink / raw)
  To: Noah Misch <noah@leadboat.com>; +Cc: Andrew Dunstan <andrew@dunslane.net>; pgsql-bugs; peter_e@gmx.net

On Sun, Jul 12, 2015 at 3:57 PM, Noah Misch <noah@leadboat.com> wrote:

> On Mon, Jul 06, 2015 at 11:53:58PM -0700, Michael Paquier wrote:
> > On Mon, Jul 6, 2015 at 10:04 PM, Noah Misch wrote:
> > >> Also, if we would
> > >> want to have a real installcheck mode, what we should use is not the
> > >> path to what has been built but the path to the installation that the
> > >> Postgres instance needed is using. Now if you want to fix it if you
> > >> fix that's incorrect I won't complain about that :)
> > >
> > > I don't wish to.  I was content with released-branch vcregress.pl
> semantics.
> >
> > Attached is a patch to revert to the pre-9.4 way of doing...
>
> This is a start.  Study "git diff REL9_4_STABLE src/tools/msvc/
> vcregress.pl"
> after applying it.  To give just one example of material left to revert, it
> leaves two absolute-path "chdir" calls in a row.
>

Then the attached I guess addresses your concerns..
-- 
Michael

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

Attachments:

20150712_light_tempinstall.patch (text/x-diff, 2.5K) download diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index 6196383..d2e0b3d 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -156,14 +156,13 @@ sub ecpgcheck sub isolationcheck { - chdir $startdir; - - InstallTemp(); + copy("${topdir}/$Config/isolationtester/isolationtester.exe", + "${topdir}/$Config/pg_isolation_regress"); chdir "${topdir}/src/test/isolation"; my @args = ( - "${tmp_installdir}/bin/pg_isolation_regress", - "--bindir=${tmp_installdir}/bin", + "${topdir}/$Config/pg_isolation_regress/pg_isolation_regress", + "--bindir=${topdir}/${Config}/psql", "--inputdir=.", "--schedule=./isolation_schedule"); push(@args, $maxconn) if $maxconn; @@ -174,9 +173,6 @@ sub isolationcheck sub plcheck { - chdir $startdir; - - InstallTemp(); chdir "${topdir}/src/pl"; foreach my $pl (glob("*")) @@ -214,8 +210,8 @@ sub plcheck "============================================================\n"; print "Checking $lang\n"; my @args = ( - "${tmp_installdir}/bin/pg_regress", - "--bindir=${tmp_installdir}/bin", + "$topdir/$Config/pg_regress/pg_regress", + "--bindir=${topdir}/${Config}/psql", "--dbname=pl_regression", @lang_args, @tests); system(@args); my $status = $? >> 8; @@ -277,8 +273,8 @@ sub subdircheck print "============================================================\n"; print "Checking $module\n"; my @args = ( - "${tmp_installdir}/bin/pg_regress", - "--bindir=${tmp_installdir}/bin", + "$topdir/$Config/pg_regress/pg_regress", + "--bindir=${topdir}/${Config}/psql", "--dbname=contrib_regression", @opts, @tests); system(@args); my $status = $? >> 8; @@ -290,11 +286,9 @@ sub subdircheck sub contribcheck { - InstallTemp(); chdir "$topdir/contrib"; foreach my $module (glob("*")) { - # these configuration-based exclusions must match Install.pm next if ($module eq "uuid-ossp" && !defined($config->{uuid})); next if ($module eq "sslinfo" && !defined($config->{openssl})); @@ -310,7 +304,6 @@ sub contribcheck sub modulescheck { - InstallTemp(); chdir "$topdir/src/test/modules"; foreach my $module (glob("*")) { @@ -323,8 +316,8 @@ sub modulescheck sub standard_initdb { return ( - system("${tmp_installdir}/bin/initdb", '-N') == 0 and system( - "${tmp_installdir}/bin/pg_regress", '--config-auth', + system("initdb", '-N') == 0 and system( + "$topdir/$Config/pg_regress/pg_regress", '--config-auth', $ENV{PGDATA}) == 0); }
^ permalink raw reply [nested|flat] 9+ messages in thread

* Re: contribcheck and modulescheck of MSVC's vcregress.pl cannot work independently
@ 2015-07-25 21:50  Noah Misch <noah@leadboat.com>
  parent: Michael Paquier <michael.paquier@gmail.com>
  0 siblings, 0 replies; 9+ messages in thread

From: Noah Misch @ 2015-07-25 21:50 UTC (permalink / raw)
  To: Michael Paquier <michael.paquier@gmail.com>; +Cc: Andrew Dunstan <andrew@dunslane.net>; pgsql-bugs; peter_e@gmx.net

On Sun, Jul 12, 2015 at 05:50:42AM -0700, Michael Paquier wrote:
> On Sun, Jul 12, 2015 at 3:57 PM, Noah Misch <noah@leadboat.com> wrote:
> > On Mon, Jul 06, 2015 at 11:53:58PM -0700, Michael Paquier wrote:
> > > Attached is a patch to revert to the pre-9.4 way of doing...
> >
> > This is a start.  Study "git diff REL9_4_STABLE src/tools/msvc/
> > vcregress.pl"
> > after applying it.  To give just one example of material left to revert, it
> > leaves two absolute-path "chdir" calls in a row.
> >
> 
> Then the attached I guess addresses your concerns..

It did not; that version moved the project from 5% done to 15% done, perhaps.
I redeveloped it for several more hours last weekend and today, and I plan to
commit the attached stack of patches.

nm

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

Attachments: download all (3 files, .tar.gz)

install-msvc-skip-temp-v1.patch (text/plain, 1.8K) download commit 44cc701 Author: Noah Misch <noah@leadboat.com> AuthorDate: Sat Jul 25 17:39:12 2015 -0400 Commit: Noah Misch <noah@leadboat.com> CommitDate: Sat Jul 25 17:39:12 2015 -0400 MSVC: Future-proof installation file skip logic. This code relied on knowing exactly where in the source tree temporary installations might appear. A reasonable hacker may not think to update this code when adding use of a temporary installation, making it fragile. Observe that commit 9fa8b0ee90c44c0f97d16bf65e94322988c94864 broke it unnoticed, and commit dcae5faccab64776376d354decda0017c648bb53 fixed it unnoticed. Back-patch to 9.5 only; use of temporary installations is unlikely to change in released versions. diff --git a/src/tools/msvc/Install.pm b/src/tools/msvc/Install.pm index b592f99..f955725 100644 --- a/src/tools/msvc/Install.pm +++ b/src/tools/msvc/Install.pm @@ -98,6 +98,9 @@ sub Install { wanted => sub { /^.*\.sample\z/s && push(@$sample_files, $File::Find::name); + + # Don't find files of in-tree temporary installations. + $_ eq 'share' and $File::Find::prune = 1; } }, @top_dir); @@ -152,6 +155,9 @@ sub Install { wanted => sub { /^(.*--.*\.sql|.*\.control)\z/s && push(@$pl_extension_files, $File::Find::name); + + # Don't find files of in-tree temporary installations. + $_ eq 'share' and $File::Find::prune = 1; } }, @pldirs); @@ -199,8 +205,6 @@ sub CopySetOfFiles print "Copying $what" if $what; foreach (@$flist) { - next if /regress/; # Skip temporary install in regression subdir - next if /ecpg.test/; # Skip temporary install in regression subdir my $tgt = $target . basename($_); print "."; lcopy($_, $tgt) || croak "Could not copy $_: $!\n";
path-dedup-vcregress-v1.patch (text/plain, 915B) download commit fe76c04 Author: Noah Misch <noah@leadboat.com> AuthorDate: Sat Jul 25 17:39:43 2015 -0400 Commit: Noah Misch <noah@leadboat.com> CommitDate: Sat Jul 25 17:39:43 2015 -0400 MSVC: Remove duplicate PATH entry in test harness. Back-patch to 9.5, where commit 4cb7d671fddc8855c8def2de51fb23df1c8ac0af introduced it. diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index 6196383..1a0ae67 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -50,7 +50,7 @@ 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"); -$ENV{PATH} = "$topdir/$Config/libpq;$topdir/$Config/libpq;$ENV{PATH}"; +$ENV{PATH} = "$topdir/$Config/libpq;$ENV{PATH}"; my $schedule = shift; unless ($schedule)
revert-95-vcregress-v1.patch (text/plain, 5.8K) download commit b5277e2 (HEAD, master) Author: Noah Misch <noah@leadboat.com> AuthorDate: Sat Jul 25 17:40:04 2015 -0400 Commit: Noah Misch <noah@leadboat.com> CommitDate: Sat Jul 25 17:40:04 2015 -0400 MSVC: Revert most 9.5 changes to pre-9.5 vcregress.pl tests. The reverted changes did not narrow the semantic gap between the MSVC build system and the GNU make build system. For targets that run multiple suites, restore vcregress.pl to mimicking "make -k" rather than the "make -S" default. Lack of "-k" would be more burdensome than lack of "-S"; that affects both the pre-9.5 "contribcheck" target and the new "modulescheck" target. Keep changes reflecting contemporary changes to the GNU make build system, and keep updates to Makefile parsing. Keep the loss of --psqldir in "check" and "ecpgcheck" targets; it had been a no-op when used alongside --temp-install. No log message mentioned any of the reverted changes. Based on a germ by Michael Paquier. Back-patch to 9.5. diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index 1a0ae67..0d2f5ec 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -108,15 +108,12 @@ sub installcheck sub check { - chdir $startdir; - InstallTemp(); chdir "${topdir}/src/test/regress"; - my @args = ( - "${tmp_installdir}/bin/pg_regress", + "../../../$Config/pg_regress/pg_regress", "--dlpath=.", - "--bindir=${tmp_installdir}/bin", + "--bindir=", "--schedule=${schedule}_schedule", "--encoding=SQL_ASCII", "--no-locale", @@ -136,11 +133,9 @@ sub ecpgcheck exit $status if $status; InstallTemp(); chdir "$topdir/src/interfaces/ecpg/test"; - - $ENV{PATH} = "${tmp_installdir}/bin;${tmp_installdir}/lib;$ENV{PATH}"; $schedule = "ecpg"; my @args = ( - "${tmp_installdir}/bin/pg_regress_ecpg", + "../../../../$Config/pg_regress_ecpg/pg_regress_ecpg", "--bindir=", "--dbname=regress1,connectdb", "--create-role=connectuser,connectdb", @@ -156,14 +151,12 @@ sub ecpgcheck sub isolationcheck { - chdir $startdir; - - InstallTemp(); - chdir "${topdir}/src/test/isolation"; - + chdir "../isolation"; + copy("../../../$Config/isolationtester/isolationtester.exe", + "../../../$Config/pg_isolation_regress"); my @args = ( - "${tmp_installdir}/bin/pg_isolation_regress", - "--bindir=${tmp_installdir}/bin", + "../../../$Config/pg_isolation_regress/pg_isolation_regress", + "--bindir=../../../$Config/psql", "--inputdir=.", "--schedule=./isolation_schedule"); push(@args, $maxconn) if $maxconn; @@ -174,10 +167,7 @@ sub isolationcheck sub plcheck { - chdir $startdir; - - InstallTemp(); - chdir "${topdir}/src/pl"; + chdir "../../pl"; foreach my $pl (glob("*")) { @@ -214,8 +204,8 @@ sub plcheck "============================================================\n"; print "Checking $lang\n"; my @args = ( - "${tmp_installdir}/bin/pg_regress", - "--bindir=${tmp_installdir}/bin", + "../../../$Config/pg_regress/pg_regress", + "--bindir=../../../$Config/psql", "--dbname=pl_regression", @lang_args, @tests); system(@args); my $status = $? >> 8; @@ -230,7 +220,6 @@ sub subdircheck { my $subdir = shift; my $module = shift; - my $mstat = 0; if ( !-d "$module/sql" || !-d "$module/expected" @@ -277,24 +266,19 @@ sub subdircheck print "============================================================\n"; print "Checking $module\n"; my @args = ( - "${tmp_installdir}/bin/pg_regress", - "--bindir=${tmp_installdir}/bin", + "$topdir/$Config/pg_regress/pg_regress", + "--bindir=${topdir}/${Config}/psql", "--dbname=contrib_regression", @opts, @tests); system(@args); - my $status = $? >> 8; - $mstat ||= $status; chdir ".."; - - exit $mstat if $mstat; } sub contribcheck { - InstallTemp(); - chdir "$topdir/contrib"; + chdir "../../../contrib"; + my $mstat = 0; foreach my $module (glob("*")) { - # these configuration-based exclusions must match Install.pm next if ($module eq "uuid-ossp" && !defined($config->{uuid})); next if ($module eq "sslinfo" && !defined($config->{openssl})); @@ -305,26 +289,31 @@ sub contribcheck next if ($module eq "sepgsql"); subdircheck("$topdir/contrib", $module); + my $status = $? >> 8; + $mstat ||= $status; } + exit $mstat if $mstat; } sub modulescheck { - InstallTemp(); - chdir "$topdir/src/test/modules"; + chdir "../../../src/test/modules"; + my $mstat = 0; foreach my $module (glob("*")) { subdircheck("$topdir/src/test/modules", $module); + my $status = $? >> 8; + $mstat ||= $status; } + exit $mstat if $mstat; } - # Run "initdb", then reconfigure authentication. sub standard_initdb { return ( - system("${tmp_installdir}/bin/initdb", '-N') == 0 and system( - "${tmp_installdir}/bin/pg_regress", '--config-auth', + system('initdb', '-N') == 0 and system( + "$topdir/$Config/pg_regress/pg_regress", '--config-auth', $ENV{PGDATA}) == 0); } @@ -343,13 +332,14 @@ sub upgradecheck $ENV{PGPORT} ||= 50432; my $tmp_root = "$topdir/src/bin/pg_upgrade/tmp_check"; (mkdir $tmp_root || die $!) unless -d $tmp_root; - - InstallTemp(); + my $upg_tmp_install = "$tmp_root/install"; # unshared temp install + print "Setting up temp install\n\n"; + Install($upg_tmp_install, "all", $config); # Install does a chdir, so change back after that chdir $cwd; my ($bindir, $libdir, $oldsrc, $newsrc) = - ("$tmp_installdir/bin", "$tmp_installdir/lib", $topdir, $topdir); + ("$upg_tmp_install/bin", "$upg_tmp_install/lib", $topdir, $topdir); $ENV{PATH} = "$bindir;$ENV{PATH}"; my $data = "$tmp_root/data"; $ENV{PGDATA} = "$data.old"; @@ -488,6 +478,7 @@ sub InstallTemp { print "Setting up temp install\n\n"; Install("$tmp_installdir", "all", $config); + $ENV{PATH} = "$tmp_installdir/bin;$ENV{PATH}"; } sub usage
^ permalink raw reply [nested|flat] 9+ messages in thread


end of thread, other threads:[~2015-07-25 21:50 UTC | newest]

Thread overview: 9+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-06-01 05:49 contribcheck and modulescheck of MSVC's vcregress.pl cannot work independently Michael Paquier <michael.paquier@gmail.com>
2015-06-01 15:31 ` Andrew Dunstan <andrew@dunslane.net>
2015-07-04 01:37 ` Noah Misch <noah@leadboat.com>
2015-07-04 02:26   ` Michael Paquier <michael.paquier@gmail.com>
2015-07-07 05:04     ` Noah Misch <noah@leadboat.com>
2015-07-07 06:53       ` Michael Paquier <michael.paquier@gmail.com>
2015-07-12 06:57         ` Noah Misch <noah@leadboat.com>
2015-07-12 12:50           ` Michael Paquier <michael.paquier@gmail.com>
2015-07-25 21:50             ` Noah Misch <noah@leadboat.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox