From: Andres Freund <andres@anarazel.de>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Alvaro Herrera <alvherre@alvh.no-ip.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Reference test binary using TESTDIR in 001_libpq_pipeline.pl.
Date: Wed, 20 Oct 2021 09:31:23 -0700
Message-ID: <20211020163123.adogznqee7oosvj5@alap3.anarazel.de> (raw)
In-Reply-To: <ffca3f20-e0ed-5328-7793-cffe9cb7d59f@dunslane.net>
References: <202110181423.cmd34pruwlry@alvherre.pgsql>
<ffca3f20-e0ed-5328-7793-cffe9cb7d59f@dunslane.net>
Hi,
On 2021-10-18 11:39:08 -0400, Andrew Dunstan wrote:
> On 10/18/21 10:23 AM, Alvaro Herrera wrote:
> > On 2021-Oct-17, Andrew Dunstan wrote:
> >
> >> +sub find_built_program
> >> +{
> >> + my $program = shift;
> >> + my $path;
> >> +
> >> + if (defined $ENV{MSBUILDDIR})
> >> + {
> >> + # vcregress.pl sets MSBUILDDIR which is the root of all the build dirs
> >> + my $wanted = sub { $_ eq "$program.exe" && $path = $File::Find::name;};
> >> + File::Find::find($wanted,$ENV{MSBUILDDIR});
> >> + }
> > Hmm, it seems weird to have to use File::Find when we already know where
> > the program is, right? I mean, per your previous patch, we know that
> > the program is in $MSBUILDDIR/libpq_pipeline/libpq_pipeline.exe, so why
> > don't we make this one be
> >
> > if (defined $ENV{MSBUILDDIR})
> > {
> > return $ENV{MSBUILDDIR} . "$program/$program.exe";
> > }
>
>
> Could do, but say the module had two programs? Mostly we don't do that
> but Release/pg_isolation_regress has two executables, so it's more than
> just theoretically possible.
ISTM that we should just make the "test invocation framework" responsible to
put the relevant directory onto PATH? I.e. Makefile.global should add the
build directory of the test to PATH, and vcregress.pl should put the relevant
$configuration/$project/ directory there?
Greetings,
Andres Freund
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: andres@anarazel.de, andrew@dunslane.net, alvherre@alvh.no-ip.org
Subject: Re: pgsql: Reference test binary using TESTDIR in 001_libpq_pipeline.pl.
In-Reply-To: <20211020163123.adogznqee7oosvj5@alap3.anarazel.de>
References: <202110181423.cmd34pruwlry@alvherre.pgsql> <ffca3f20-e0ed-5328-7793-cffe9cb7d59f@dunslane.net> <20211020163123.adogznqee7oosvj5@alap3.anarazel.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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