File tree Expand file tree Collapse file tree 6 files changed +5
-35
lines changed Expand file tree Collapse file tree 6 files changed +5
-35
lines changed Original file line number Diff line number Diff line change @@ -185,7 +185,6 @@ sub check_relation_corruption
185
185
my $basedir = $node -> basedir;
186
186
my $tablespace_dir = " $basedir /ts_corrupt_dir" ;
187
187
mkdir ($tablespace_dir );
188
- $tablespace_dir = TestLib::perl2host($tablespace_dir );
189
188
$node -> safe_psql(' postgres' ,
190
189
" CREATE TABLESPACE ts_corrupt LOCATION '$tablespace_dir ';" );
191
190
check_relation_corruption($node , ' corrupt2' , ' ts_corrupt' );
Original file line number Diff line number Diff line change @@ -970,7 +970,7 @@ primary_conninfo='$root_connstr'
970
970
sub enable_restoring
971
971
{
972
972
my ($self , $root_node ) = @_ ;
973
- my $path = TestLib::perl2host( $root_node -> archive_dir) ;
973
+ my $path = $root_node -> archive_dir;
974
974
my $name = $self -> name;
975
975
976
976
print " ### Enabling WAL restore for node \" $name \"\n " ;
@@ -1015,7 +1015,7 @@ sub set_standby_mode
1015
1015
sub enable_archiving
1016
1016
{
1017
1017
my ($self ) = @_ ;
1018
- my $path = TestLib::perl2host( $self -> archive_dir) ;
1018
+ my $path = $self -> archive_dir;
1019
1019
my $name = $self -> name;
1020
1020
1021
1021
print " ### Enabling WAL archiving for node \" $name \"\n " ;
Original file line number Diff line number Diff line change @@ -193,33 +193,6 @@ sub tempdir_short
193
193
return File::Temp::tempdir(CLEANUP => 1);
194
194
}
195
195
196
- # Translate a Perl file name to a host file name. Currently, this is a no-op
197
- # except for the case of Perl=msys and host=mingw32. The subject need not
198
- # exist, but its parent directory must exist.
199
- sub perl2host
200
- {
201
- my ($subject ) = @_ ;
202
- return $subject unless $Config {osname } eq ' msys' ;
203
- my $here = cwd;
204
- my $leaf ;
205
- if (chdir $subject )
206
- {
207
- $leaf = ' ' ;
208
- }
209
- else
210
- {
211
- $leaf = ' /' . basename $subject ;
212
- my $parent = dirname $subject ;
213
- chdir $parent or die " could not chdir \" $parent \" : $! " ;
214
- }
215
-
216
- # this odd way of calling 'pwd -W' is the only way that seems to work.
217
- my $dir = qx{ sh -c "pwd -W"} ;
218
- chomp $dir ;
219
- chdir $here ;
220
- return $dir . $leaf ;
221
- }
222
-
223
196
=pod
224
197
225
198
=item has_wal_read_bug()
Original file line number Diff line number Diff line change 30
30
31
31
my $tablespaceDir = TestLib::tempdir;
32
32
33
- my $realTSDir = TestLib::perl2host($tablespaceDir );
34
-
35
- $node -> safe_psql(' postgres' , " CREATE TABLESPACE ts1 LOCATION '$realTSDir '" );
33
+ $node -> safe_psql(' postgres' , " CREATE TABLESPACE ts1 LOCATION '$tablespaceDir '" );
36
34
$node -> safe_psql(' postgres' ,
37
35
' CREATE UNLOGGED TABLE ts1_unlogged (id int) TABLESPACE ts1' );
38
36
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ sub init_start
102
102
# Scenarios involving no postmaster.pid, dead postmaster, and a live backend.
103
103
# Use a regress.c function to emulate the responsiveness of a backend working
104
104
# through a CPU-intensive task.
105
- my $regress_shlib = TestLib::perl2host( $ENV {REGRESS_SHLIB }) ;
105
+ my $regress_shlib = $ENV {REGRESS_SHLIB };
106
106
$gnat -> safe_psql(' postgres' , <<EOSQL );
107
107
CREATE FUNCTION wait_pid(int)
108
108
RETURNS void
Original file line number Diff line number Diff line change 28
28
# Note: consistent use of forward slashes here avoids any escaping problems
29
29
# that arise from use of backslashes. That means we need to double-quote all
30
30
# the paths in the archive_command
31
- my $perlbin = TestLib::perl2host( $^X) ;
31
+ my $perlbin = $^X;
32
32
$perlbin =~ s !\\ ! /! g if $TestLib::windows_os ;
33
33
my $archivedir_primary = $node_primary -> archive_dir;
34
34
$archivedir_primary =~ s !\\ ! /! g if $TestLib::windows_os ;
You can’t perform that action at this time.
0 commit comments