Re: A test for replay of regression tests - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: A test for replay of regression tests
Date
Msg-id 3e9d1044-ddb2-91a4-917b-8cab3ea93b69@dunslane.net
Whole thread Raw
In response to Re: A test for replay of regression tests  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: A test for replay of regression tests
List pgsql-hackers
On 12/3/21 23:21, Thomas Munro wrote:
>
> Next problem:  The below is clearly not the right way to find the
> pg_regress binary and bindir, and doesn't work on Windows or VPATH.
> Any suggestions for how to do this?  I feel like something like
> $node->installed_command() or similar logic is needed...
>
> # Run the regression tests against the primary.
> # XXX How should we find the pg_regress binary and bindir?
> system_or_bail("../regress/pg_regress",
>                "--bindir=../../bin/psql",
>                "--port=" . $node_primary->port,
>                "--schedule=../regress/parallel_schedule",
>                "--dlpath=../regress",
>                "--inputdir=../regress");
>

TAP tests are passed a path to pg_regress as $ENV{PG_REGRESS}. You
should be using that. On non-MSVC, the path to a non-installed psql is
in this case  "$TESTDIR/../../bin/psql" - this should work for VPATH
builds as well as non-VPATH. On MSVC it's a bit harder - it's
"$top_builddir/$releasetype/psql" but we don't expose that. Perhaps we
should. c.f. commit f4ce6c4d3a


cheers


andrew


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




pgsql-hackers by date:

Previous
From: "osumi.takamichi@fujitsu.com"
Date:
Subject: RE: Failed transaction statistics to measure the logical replication progress
Next
From: Tom Lane
Date:
Subject: Re: The "char" type versus non-ASCII characters