Re: set TESTDIR from perl rather than Makefile

From: Justin Pryzby <pryzby(at)telsasoft(dot)com>
To: 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>, Andrew Dunstan <andrew(at)dunslane(dot)net>, 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-26 01:10:10
Message-ID: 20220226011009.GI9008@telsasoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, Feb 20, 2022 at 04:39:08PM -0800, Andres Freund wrote:
> On 2022-02-19 17:53:09 -0600, Justin Pryzby wrote:
> > I also meant to also attach it.
>
> Is the patch actually independent of the other patches in your stack?

Yes - I rearranged it that way for this thread.

However, it's best served/combined with the alltaptests patch :)

> > - $expected = slurp_file_eval("traces/$testname.trace");
> > + my $inputdir = "$ENV{'TESTDIR'}/tmp_check";
> > + $expected = slurp_file_eval("$inputdir/traces/$testname.trace");
>
> Why is this needed? Shouldn't we end up in exactly the same dir with/without
> this patch?

Right - I'd incorrectly set test_dir to t/ rather than the parent dir.

> > +++ b/src/tools/msvc/vcregress.pl
> > @@ -261,10 +261,8 @@ sub tap_check
> > $ENV{PG_REGRESS} = "$topdir/$Config/pg_regress/pg_regress";
> > $ENV{REGRESS_SHLIB} = "$topdir/src/test/regress/regress.dll";
> >
> > - $ENV{TESTDIR} = "$dir";
> > my $module = basename $dir;
> > - # add the module build dir as the second element in the PATH
> > - $ENV{PATH} =~ s!;!;$topdir/$Config/$module;!;
> > + #$ENV{VCREGRESS_MODE} = $Config;
>
> Hm. How does the module build dir end up on PATH after this?

That patch only dealt with TESTDIR. PATH was still set by makefiles.
For MSVC, it was being set to top_builddir/tmp_install.

I've added a 2nd patch to also set PATH. Maybe it should also set
PATH=$bindir:$PATH - I'm not sure.

https://github.com/justinpryzby/postgres/runs/5340884168

Attachment Content-Type Size
0001-wip-set-TESTDIR-from-src-test-perl-rather-than-Makef.patch text/x-diff 4.0 KB
0002-s-also-remove-PATH.patch text/x-diff 2.9 KB
0003-cirrus-windows-increase-timeout-to-20min.patch text/x-diff 1.1 KB
0004-vcregress-add-alltaptests.patch text/x-diff 4.2 KB
0005-cirrus-include-hints-how-to-install-OS-packages.patch text/x-diff 2.2 KB
0006-vcregress-run-alltaptests-in-parallel.patch text/x-diff 5.2 KB
0007-tmp-run-tap-tests-first.patch text/x-diff 1.1 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2022-02-26 01:52:29 Re: convert libpq uri-regress tests to tap test
Previous Message Andres Freund 2022-02-26 00:27:46 Re: Mingw task for Cirrus CI