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