Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set

From: Andres Freund <andres(at)anarazel(dot)de>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: Michael Paquier <michael(at)paquier(dot)xyz>, Noah Misch <noah(at)leadboat(dot)com>, Julien Rouhaud <rjuju123(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Postgres hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set
Date: 2022-02-13 05:29:55
Message-ID: 20220213052955.dh7lheehit7bsemf@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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(at)anarazel(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Dilip Kumar 2022-02-13 06:34:16 Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints
Previous Message Justin Pryzby 2022-02-13 05:19:38 Re: Adding CI to our tree