Skip to content

Commit 574526a

Browse files
committed
TAP: Suffix temporary directories with node name
Temporary directories for PostgreSQL nodes used in TAP tests now have the node name appended to them. By Kyotaro Horiguchi
1 parent f989f71 commit 574526a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/test/perl/PostgresNode.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ sub new
128128
my $self = {
129129
_port => $pgport,
130130
_host => $pghost,
131-
_basedir => TestLib::tempdir,
131+
_basedir => TestLib::tempdir($name),
132132
_name => $name,
133133
_logfile => "$TestLib::log_path/${testname}_${name}.log" };
134134

src/test/perl/TestLib.pm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,11 @@ INIT
112112
#
113113
sub tempdir
114114
{
115+
my ($prefix) = @_;
116+
$prefix = "tmp_test" if (!$prefix);
115117
return File::Temp::tempdir(
116-
'tmp_testXXXX',
117-
DIR => $tmp_check,
118+
$prefix . '_XXXX',
119+
DIR => $tmp_check,
118120
CLEANUP => 1);
119121
}
120122

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy