pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Dunstan <andrew@dunslane.net>
To: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Reference test binary using TESTDIR in 001_libpq_pipeline.pl.
Date: Fri, 8 Oct 2021 11:41:50 -0400
Message-ID: <4941f5a5-2d50-1a0e-6701-14c5fefe92d6@dunslane.net> (raw)
In-Reply-To: <E1mWR73-0000qh-Eq@gemulon.postgresql.org>
References: <E1mWR73-0000qh-Eq@gemulon.postgresql.org>


On 10/1/21 6:34 PM, Andres Freund wrote:
> Reference test binary using TESTDIR in 001_libpq_pipeline.pl.
>
> The previous approach didn't really work on windows, due to the PATH separator
> being ';' not ':'. Instead of making the PATH change more complicated,
> reference the binary using the TESTDIR environment.
>
> Reported-By: Andres Freund <andres@anarazel.de>
> Suggested-By: Andrew Dunstan <andrew@dunslane.net>
> Discussion: https://postgr.es/m/20210930214040.odkdd42vknvzifm6@alap3.anarazel.de
> Backpatch: 14-, where the test was introduced.
>

I don't think any of us were thinking very clearly about this. Of
course, MSVC doesn't build executables in $TESTDIR. If we want to pick
up the executable from where it's built we'll need a little help from
vcregress.pl. I haven't tested it but What I have in mind is something
like the attached.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com

Attachments:

libpg_pipeline_fix.patch (text/x-patch, 1.1K) download diff --git a/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl b/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl index 6721edfa71..7951600697 100644 --- a/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl +++ b/src/test/modules/libpq_pipeline/t/001_libpq_pipeline.pl @@ -14,7 +14,15 @@ $node->init; $node->start; my $numrows = 700; -my $libpq_pipeline = "$ENV{TESTDIR}/libpq_pipeline"; +my $libpq_pipeline; +if (defined $ENV{MSBUILDDIR}) +{ + $libpq_pipeline = "$ENV{MSBUILDDIR}/libpq_pipeline/libpq_pipeline.exe"; +} +else +{ + $libpq_pipeline = "$ENV{TESTDIR}/libpq_pipeline"; +} my ($out, $err) = run_command([ $libpq_pipeline, 'tests' ]); die "oops: $err" unless $err eq ''; diff --git a/src/tools/msvc/vcregress.pl b/src/tools/msvc/vcregress.pl index 35e8f67f01..7d46b9f0cc 100644 --- a/src/tools/msvc/vcregress.pl +++ b/src/tools/msvc/vcregress.pl @@ -60,6 +60,7 @@ copy("$Config/regress/regress.dll", "src/test/regress"); copy("$Config/dummy_seclabel/dummy_seclabel.dll", "src/test/regress"); $ENV{PATH} = "$topdir/$Config/libpq;$ENV{PATH}"; +$ENV{MSBUILDDIR} = "$topdir/$Config"; if ($ENV{PERL5LIB}) {

view thread (15+ messages)  latest in thread

Message-ID: <4941f5a5-2d50-1a0e-6701-14c5fefe92d6@dunslane.net>
Permalink:  ../4941f5a5-2d50-1a0e-6701-14c5fefe92d6@dunslane.net/
Also on:    postgresql.org/message-id/4941f5a5-2d50-1a0e-6701-14c5fefe92d6@dunslane.net

 ·  · 

reply

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: andrew@dunslane.net, andres@anarazel.de
  Subject: Re: pgsql: Reference test binary using TESTDIR in 001_libpq_pipeline.pl.
  In-Reply-To: <4941f5a5-2d50-1a0e-6701-14c5fefe92d6@dunslane.net>
  References: <E1mWR73-0000qh-Eq@gemulon.postgresql.org> <4941f5a5-2d50-1a0e-6701-14c5fefe92d6@dunslane.net>

* 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