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
my $self = {
_port => $pgport,
_host => $pghost,
- _basedir => TestLib::tempdir,
+ _basedir => TestLib::tempdir("data_" . $name),
_name => $name,
_logfile => "$TestLib::log_path/${testname}_${name}.log" };
#
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);
}