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