From c30b466bde94452d4b4aad79199b9e8b149785bc Mon Sep 17 00:00:00 2001 From: Craig Ringer Date: Tue, 1 Mar 2016 21:27:36 +0800 Subject: [PATCH 5/7] 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 --- src/test/perl/PostgresNode.pm | 2 +- src/test/perl/TestLib.pm | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm index 099bb89..4eaa3ed 100644 --- a/src/test/perl/PostgresNode.pm +++ b/src/test/perl/PostgresNode.pm @@ -128,7 +128,7 @@ sub new my $self = { _port => $pgport, _host => $pghost, - _basedir => TestLib::tempdir, + _basedir => TestLib::tempdir($name), _name => $name, _logfile => "$TestLib::log_path/${testname}_${name}.log" }; diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm index 3d11cbb..8c13655 100644 --- a/src/test/perl/TestLib.pm +++ b/src/test/perl/TestLib.pm @@ -112,9 +112,11 @@ INIT # sub tempdir { + my ($prefix) = @_; + $prefix = "tmp_test" if (!$prefix); return File::Temp::tempdir( - 'tmp_testXXXX', - DIR => $tmp_check, + $prefix . '_XXXX', + DIR => $tmp_check, CLEANUP => 1); } -- 2.1.0