Re: BUG #16484: pg_regress fails with --outputdir parameter

Daniel Gustafsson <daniel@yesql.se>

From: Daniel Gustafsson <daniel@yesql.se>
To: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, r.zharkov@postgrespro.ru, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2020-06-09T08:28:32Z
Lists: pgsql-bugs
> On 9 Jun 2020, at 07:55, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 
> Michael Paquier <michael@paquier.xyz> writes:
>> And this leads me to the attached.

FWIW I agree with the extended cleanup you proposed but I also agree that it
doesn't seem worth to backpatch.

> That will create the output directory even if indir doesn't exist, which
> seems likely to lead to bogus directories hanging around in places where
> we don't need them --- plus it seems rather ugly to drop this into the
> middle of the sequence concerned with indir.  So shouldn't the new code
> be after the exit for indir not existing?

Makes sense, +1 for moving it after indir processing.

Looking at the diff, I noticed this hunk:

--- a/src/tools/msvc/vcregress.pl
+++ b/src/tools/msvc/vcregress.pl
@@ -571,8 +571,6 @@ sub upgradecheck
 	my $outputdir          = "$tmp_root/regress";
 	my @EXTRA_REGRESS_OPTS = ("--outputdir=$outputdir");
 	mkdir "$outputdir"                || die $!;
-	mkdir "$outputdir/sql"            || die $!;
-	mkdir "$outputdir/expected"       || die $!;
 	mkdir "$outputdir/testtablespace" || die $!;

On Windows we don't want testtablespace to exist whilst on non-Windows we do.
I wonder if this is a logical copy-paste from test.sh which could be removed as
well?

cheers ./daniel


Commits

  1. Create by default sql/ and expected/ for output directory in pg_regress