Re: pg_upgrade test writes to source directory

Peter Eisentraut <peter.eisentraut@enterprisedb.com>

From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Michael Paquier <michael@paquier.xyz>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2022-05-26T14:36:47Z
Lists: pgsql-hackers
On 25.05.22 09:25, Michael Paquier wrote:
>> It looks like an addition of
>>
>>      chdir $ENV{TESTOUTDIR};
>>
>> could fix it.  Please check the patch.
> I think that you mean TESTDIR, and not TESTOUTDIR?

I chose TESTOUTDIR because it corresponds to the tmp_check directory, so 
that the output files of the pg_upgrade run are removed when the test 
artifacts are cleaned up.  When using TESTDIR, the pg_upgrade output 
files end up in the build directory, which is less bad than the source 
directory, but still not ideal.



Commits

  1. Split TESTDIR into TESTLOGDIR and TESTDATADIR

  2. Don't hardcode tmp_check/ as test directory for tap tests

  3. Force run of pg_upgrade in the build directory in its TAP test

  4. Add missing test names in TAP tests of pg_upgrade