diff options
author | Noah Misch <noah@leadboat.com> | 2019-06-21 20:34:23 -0700 |
---|---|---|
committer | Noah Misch <noah@leadboat.com> | 2019-06-21 20:47:34 -0700 |
commit | a40dca815dd1d703623f774059b103a13f85e0f1 (patch) | |
tree | 637aa44e0bbfb91aa7aa5dfd11ab4702077c980c /src/test/perl/PostgresNode.pm | |
parent | f7aebd7f74117a9b44eb6af575061fc16a728236 (diff) | |
download | postgresql-a40dca815dd1d703623f774059b103a13f85e0f1.tar.gz postgresql-a40dca815dd1d703623f774059b103a13f85e0f1.zip |
Consolidate methods for translating a Perl path to a Windows path.
This fixes some TAP suites when using msys Perl and a builddir located
in an msys mount point other than "/". For example, builddir=/c/pg
exhibited the problem, since /c/pg falls in mount point "/c".
Back-patch to 9.6, where tests first started to perform such
translations. In back branches, offer both new and old APIs.
Reviewed by Andrew Dunstan.
Discussion: https://postgr.es/m/20190610045838.GA238501@rfd.leadboat.com
Diffstat (limited to 'src/test/perl/PostgresNode.pm')
-rw-r--r-- | src/test/perl/PostgresNode.pm | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/test/perl/PostgresNode.pm b/src/test/perl/PostgresNode.pm index d1e3c36a240..c222b4fc915 100644 --- a/src/test/perl/PostgresNode.pm +++ b/src/test/perl/PostgresNode.pm @@ -107,8 +107,7 @@ our @EXPORT = qw( our ($use_tcp, $test_localhost, $test_pghost, $last_host_assigned, $last_port_assigned, @all_nodes, $died); -# Windows path to virtual file system root - +# For backward compatibility only. our $vfs_path = ''; if ($Config{osname} eq 'msys') { @@ -904,7 +903,7 @@ standby_mode=on sub enable_restoring { my ($self, $root_node) = @_; - my $path = $vfs_path . $root_node->archive_dir; + my $path = TestLib::perl2host($root_node->archive_dir); my $name = $self->name; print "### Enabling WAL restore for node \"$name\"\n"; @@ -933,7 +932,7 @@ standby_mode = on sub enable_archiving { my ($self) = @_; - my $path = $vfs_path . $self->archive_dir; + my $path = TestLib::perl2host($self->archive_dir); my $name = $self->name; print "### Enabling WAL archiving for node \"$name\"\n"; |