mirror of
https://github.com/postgres/postgres.git
synced 2025-04-27 22:56:53 +03:00
Prefix temp data dirs with the node name
This makes it easier to relate the temporary data dirs to each node in a test script. Author: Kyotaro Horiguchi Reviewed-By: Craig Ringer, Alvaro Herrera
This commit is contained in:
parent
c8c7c93de8
commit
cc6077d4d5
@ -115,7 +115,7 @@ sub new
|
|||||||
my $self = {
|
my $self = {
|
||||||
_port => $pgport,
|
_port => $pgport,
|
||||||
_host => $pghost,
|
_host => $pghost,
|
||||||
_basedir => TestLib::tempdir,
|
_basedir => TestLib::tempdir("data_" . $name),
|
||||||
_name => $name,
|
_name => $name,
|
||||||
_logfile => "$TestLib::log_path/${testname}_${name}.log" };
|
_logfile => "$TestLib::log_path/${testname}_${name}.log" };
|
||||||
|
|
||||||
|
@ -128,9 +128,11 @@ sub all_tests_passing
|
|||||||
#
|
#
|
||||||
sub tempdir
|
sub tempdir
|
||||||
{
|
{
|
||||||
|
my ($prefix) = @_;
|
||||||
|
$prefix = "tmp_test" unless defined $prefix;
|
||||||
return File::Temp::tempdir(
|
return File::Temp::tempdir(
|
||||||
'tmp_testXXXX',
|
$prefix . '_XXXX',
|
||||||
DIR => $tmp_check,
|
DIR => $tmp_check,
|
||||||
CLEANUP => 1);
|
CLEANUP => 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user