Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Michael Paquier <michael@paquier.xyz>, Noah Misch <noah@leadboat.com>, Julien Rouhaud <rjuju123@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>, Andrew Dunstan <andrew@dunslane.net>, Postgres hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-02-13T05:29:55Z
Lists: pgsql-hackers
Hi,
On 2022-02-13 18:07:30 +1300, Thomas Munro wrote:
> On Sun, Feb 13, 2022 at 5:50 PM Andres Freund <andres@anarazel.de> wrote:
> >> > +# required for 027_stream_regress.pl
> >> > +REGRESS_OUTPUTDIR=$(abs_top_builddir)/src/test/recovery
> >> > +export REGRESS_OUTPUTDIR
> >>
> >> Why do we need this?
> >
> > The Make macro "prove_check" (src/Makefile.global.in) always changes
> > to the source directory to run TAP tests. Without an explicit
> > directive to control where regression test output goes, it got
> > splattered all over the source tree in VPATH builds. I didn't see an
> > existing way to adjust that (did I miss something?). Hence desire to
> > pass down a path in the build tree. Better ideas welcome.
>
> I thought it was a goal that VPATH builds shouldn't pollute the source
> tree, but the Make macro prove_check is explicitly doing so by
> default. Perhaps *that* should be fixed?
Sure, prove changes into the source dir. But we don't put test data / output
into the source? That's what TESTDIR is used for:
# Determine output directories, and create them. The base path is the
# TESTDIR environment variable, which is normally set by the invoking
# Makefile.
$tmp_check = $ENV{TESTDIR} ? "$ENV{TESTDIR}/tmp_check" : "tmp_check";
$log_path = "$tmp_check/log";
Afaics all the "regress test inside tap test" cases would need to do is to pass
--outputdir=${PostgreSQL::Test::Utils::tmp_check} and you'd get exactly the same path as
REGRESS_OUTPUTDIR currently provides.
I only use vpath builds, and I don't see any tap test data / log in the source
tree....
Greetings,
Andres Freund
Commits
-
Improve and fix some issues in the TAP tests of pg_upgrade
- eaa5ebe046c4 15.0 landed
-
Fix several issues with the TAP tests of pg_upgrade
- 7dd3ee508432 15.0 landed
-
Make upgradecheck a no-op in MSVC's vcregress.pl
- d2a2ce4184b0 15.0 landed
-
Switch the regression tests of pg_upgrade to use TAP tests
- 322becb6085c 15.0 landed
-
Fix check for PGHOST[ADDR] in pg_upgrade with Windows and temporary paths
- dc57366c5836 15.0 landed
-
Remove REGRESS_OUTPUTDIR environment variable.
- 7e6124ca7d81 15.0 landed
-
Add PostgreSQL::Test::Cluster::config_data()
- ba15f16107be 15.0 landed