Re: set TESTDIR from perl rather than Makefile

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Justin Pryzby <pryzby(at)telsasoft(dot)com>, Andres Freund <andres(at)anarazel(dot)de>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Melanie Plageman <melanieplageman(at)gmail(dot)com>, Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>, Daniel Gustafsson <daniel(at)yesql(dot)se>
Subject: Re: set TESTDIR from perl rather than Makefile
Date: 2022-02-21 12:00:54
Message-ID: 0d18be28-8314-6587-8ea2-713bb663d539@dunslane.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


On 2/19/22 18:53, Justin Pryzby wrote:
> On Sat, Feb 19, 2022 at 05:41:49PM -0600, Justin Pryzby wrote:
>> I rebased and fixed the check-guc script to work, made it work with vpath
>> builds, and cleaned it up some.
> I also meant to also attach it.

This is going to break a bunch of stuff as written.

First, it's not doing the same thing. The current system sets TESTDIR to
be the parent of the directory that holds the test. e.g. for
src/bin/pg_ctl/t/001_start_stop.pl it's src/bin/pg_ctl in the build
tree, not the 't' subdirectory. This patch apparently sets it to the 't'
subdirectory. That will break anything that goes looking for log files
in the current location, like the buildfarm client, and possibly some CI
setups as well.

Also, unless I'm mistaken it appears to to the wrong thing for vpath
builds:

my $test_dir = File::Spec->rel2abs(dirname($0));

is completely wrong for vpaths, since that will place it in the source
tree, not the build tree.

Last, and for no explained reason that I can see, the patch undoes
commit f4ce6c4d3a, but only for msvc builds. Even if that's justified it
appears to have no relevance to this patch.

cheers

andrew

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Euler Taveira 2022-02-21 12:09:12 speed up a logical replica setup
Previous Message Amit Kapila 2022-02-21 11:30:43 Re: pg_stat_get_replication_slot and pg_stat_get_subscription_worker incorrectly marked as proretset