aboutsummaryrefslogtreecommitdiff
path: root/src/test/perl/PostgreSQL/Test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/perl/PostgreSQL/Test')
-rw-r--r--src/test/perl/PostgreSQL/Test/Cluster.pm4
-rw-r--r--src/test/perl/PostgreSQL/Test/Utils.pm58
2 files changed, 2 insertions, 60 deletions
diff --git a/src/test/perl/PostgreSQL/Test/Cluster.pm b/src/test/perl/PostgreSQL/Test/Cluster.pm
index ed70eff374b..702b4c2b1c1 100644
--- a/src/test/perl/PostgreSQL/Test/Cluster.pm
+++ b/src/test/perl/PostgreSQL/Test/Cluster.pm
@@ -1076,7 +1076,7 @@ primary_conninfo='$root_connstr'
sub enable_restoring
{
my ($self, $root_node, $standby) = @_;
- my $path = PostgreSQL::Test::Utils::perl2host($root_node->archive_dir);
+ my $path = $root_node->archive_dir;
my $name = $self->name;
print "### Enabling WAL restore for node \"$name\"\n";
@@ -1144,7 +1144,7 @@ sub set_standby_mode
sub enable_archiving
{
my ($self) = @_;
- my $path = PostgreSQL::Test::Utils::perl2host($self->archive_dir);
+ my $path = $self->archive_dir;
my $name = $self->name;
print "### Enabling WAL archiving for node \"$name\"\n";
diff --git a/src/test/perl/PostgreSQL/Test/Utils.pm b/src/test/perl/PostgreSQL/Test/Utils.pm
index 31e2b0315ee..fc8ca741943 100644
--- a/src/test/perl/PostgreSQL/Test/Utils.pm
+++ b/src/test/perl/PostgreSQL/Test/Utils.pm
@@ -24,7 +24,6 @@ PostgreSQL::Test::Utils - helper module for writing PostgreSQL's C<prove> tests.
# Miscellanea
print "on Windows" if $PostgreSQL::Test::Utils::windows_os;
- my $path = PostgreSQL::Test::Utils::perl2host($backup_dir);
ok(check_mode_recursive($stream_dir, 0700, 0600),
"check stream dir permissions");
PostgreSQL::Test::Utils::system_log('pg_ctl', 'kill', 'QUIT', $slow_pid);
@@ -297,61 +296,6 @@ sub tempdir_short
=pod
-=item perl2host()
-
-Translate a virtual file name to a host file name. Currently, this is a no-op
-except for the case of Perl=msys and host=mingw32. The subject need not
-exist, but its parent or grandparent directory must exist unless cygpath is
-available.
-
-The returned path uses forward slashes but has no trailing slash.
-
-=cut
-
-sub perl2host
-{
- my ($subject) = @_;
- return $subject;
- if ($is_msys2)
- {
- # get absolute, windows type path
- my $path = qx{cygpath -a -m "$subject"};
- if (!$?)
- {
- chomp $path;
- $path =~ s!/$!!;
- return $path if $path;
- }
- # fall through if this didn't work.
- }
- my $here = cwd;
- my $leaf;
- if (chdir $subject)
- {
- $leaf = '';
- }
- else
- {
- $leaf = '/' . basename $subject;
- my $parent = dirname $subject;
- if (!chdir $parent)
- {
- $leaf = '/' . basename($parent) . $leaf;
- $parent = dirname $parent;
- chdir $parent or die "could not chdir \"$parent\": $!";
- }
- }
-
- # this odd way of calling 'pwd -W' is the only way that seems to work.
- my $dir = qx{sh -c "pwd -W"};
- chomp $dir;
- $dir =~ s!/$!!;
- chdir $here;
- return $dir . $leaf;
-}
-
-=pod
-
=item has_wal_read_bug()
Returns true if $tmp_check is subject to a sparc64+ext4 bug that causes WAL
@@ -727,8 +671,6 @@ sub dir_symlink
my $newname = shift;
if ($windows_os)
{
- $oldname = perl2host($oldname);
- $newname = perl2host($newname);
$oldname =~ s,/,\\,g;
$newname =~ s,/,\\,g;
my $cmd = qq{mklink /j "$newname" "$oldname"};