Skip to content

Commit 371c251

Browse files
author
hackorum
committed
Apply tap-test-fix.patch
1 parent 6e89028 commit 371c251

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

src/test/recovery/t/014_unlogged_reinit.pl

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,25 @@
4444

4545
my $tablespaceDir = PostgreSQL::Test::Utils::tempdir;
4646

47+
sub real_dir
48+
{
49+
my $dir = "$_[0]";
50+
return $dir unless -d $dir;
51+
use Config;
52+
return $dir unless $Config{osname} eq 'msys';
53+
use Cwd;
54+
my $here = cwd;
55+
chdir $dir;
56+
$dir = qx{sh -c "pwd -W"};
57+
chomp $dir;
58+
chdir $here;
59+
return $dir;
60+
}
61+
62+
my $realTSDir = real_dir($tablespaceDir);
63+
4764
$node->safe_psql('postgres',
48-
"CREATE TABLESPACE ts1 LOCATION '$tablespaceDir'");
65+
"CREATE TABLESPACE ts1 LOCATION '$realTSDir'");
4966
$node->safe_psql('postgres',
5067
'CREATE UNLOGGED TABLE ts1_unlogged (id int) TABLESPACE ts1');
5168

0 commit comments

Comments
 (0)