Commit cc6077d4 authored by Alvaro Herrera's avatar Alvaro Herrera

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
parent c8c7c93d
......@@ -115,7 +115,7 @@ sub new
my $self = {
_port => $pgport,
_host => $pghost,
_basedir => TestLib::tempdir,
_basedir => TestLib::tempdir("data_" . $name),
_name => $name,
_logfile => "$TestLib::log_path/${testname}_${name}.log" };
......
......@@ -128,9 +128,11 @@ sub all_tests_passing
#
sub tempdir
{
my ($prefix) = @_;
$prefix = "tmp_test" unless defined $prefix;
return File::Temp::tempdir(
'tmp_testXXXX',
DIR => $tmp_check,
$prefix . '_XXXX',
DIR => $tmp_check,
CLEANUP => 1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment