Re: [PATCH] Honor PG_TEST_NOCLEAN for tempdirs
Peter Eisentraut <peter@eisentraut.org>
From: Peter Eisentraut <peter@eisentraut.org>
To: Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>, Andrew Dunstan <andrew@dunslane.net>
Cc: Jacob Champion <jchampion@timescale.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2023-06-28T08:45:02Z
Lists: pgsql-hackers
On 27.06.23 17:54, Dagfinn Ilmari Mannsåker wrote:
> However, the docs
> (https://www.postgresql.org/docs/16/regress-tap.html#REGRESS-TAP-VARS)
> say "If the environment variable PG_TEST_NOCLEAN is set", not "is set to
> a true value", and the existing test in PostgreSQL::Test::Cluster's END
> block is:
>
> # skip clean if we are requested to retain the basedir
> next if defined $ENV{'PG_TEST_NOCLEAN'};
>
> So the original `not defined` test is consistent with that.
Right, the usual style is just to check whether an environment variable
is set to something, not what it is.
Also note that in general not all environment variables are processed by
Perl, so I would avoid encoding Perl semantics about what is "true" or
whatever into it.
Commits
-
Make PG_TEST_NOCLEAN work for temporary directories in TAP tests
- 45cfa87e9c56 11.21 landed
- af36c13a7e92 12.16 landed
- b102e80ab822 13.12 landed
- c8987ea90cf2 14.9 landed
- 4b15868b698a 15.4 landed
- c24e9ef330ac 16.0 landed
- 8c12838001c2 17.0 landed