aboutsummaryrefslogtreecommitdiff
path: root/src/test/perl/PostgreSQL/Test/Utils.pm
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2022-02-18 17:00:03 -0500
committerAndrew Dunstan <andrew@dunslane.net>2022-02-20 11:51:45 -0500
commit95d981338b241ce1d1b2346cfe2df509bb7243ca (patch)
treec5c4b5427d119aaa8550ee4a41b7bb08c5ab8a32 /src/test/perl/PostgreSQL/Test/Utils.pm
parentcf12541f2bd5fd34425ecbb99f056a30ca5b7cae (diff)
downloadpostgresql-95d981338b241ce1d1b2346cfe2df509bb7243ca.tar.gz
postgresql-95d981338b241ce1d1b2346cfe2df509bb7243ca.zip
Remove PostgreSQL::Test::Utils::perl2host completely
Commit f1ac4a74de disabled this processing, and as nothing has broken (as expected) here we proceed to remove the routine and adjust all the call sites. Backpatch to release 10 Discussion: https://postgr.es/m/0ba775a2-8aa0-0d56-d780-69427cf6f33d@dunslane.net Discussion: https://postgr.es/m/20220125023609.5ohu3nslxgoygihl@alap3.anarazel.de
Diffstat (limited to 'src/test/perl/PostgreSQL/Test/Utils.pm')
-rw-r--r--src/test/perl/PostgreSQL/Test/Utils.pm58
1 files changed, 0 insertions, 58 deletions
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"};