The tests
src/bin/pg_basebackup/t/010_pg_basebackup.pl
src/bin/pg_rewind/t/004_pg_xlog_symlink.pl
both contain a TAP skip notice "symlinks not supported on Windows".
This is untrue. Symlinks certainly work on Windows, and we have other
TAP tests using them, for example for tablespaces.
pg_rewind/t/004_pg_xlog_symlink.pl passes for me on Windows if I just
remove the skip stuff. My attached patch does that.
If I remove the skip stuff in pg_basebackup/t/010_pg_basebackup.pl, it
fails in various interesting ways. Apparently, some more work is needed
to get the various paths handled correct on Windows. (At least a
TestLib::perl2host call appears to be required.) I don't have the
enthusiasm to fix this right now, but my patch at least updates the
comment from "this isn't supported" to "this doesn't work correctly yet".
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From 822583a01dc4f16d73390e266735d758e1507636 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut <pe...@eisentraut.org>
Date: Sat, 6 Jun 2020 09:38:54 +0200
Subject: [PATCH 1/2] Enable some symlink tests on Windows
---
src/bin/pg_basebackup/t/010_pg_basebackup.pl | 6 +++---
src/bin/pg_rewind/t/004_pg_xlog_symlink.pl | 11 +----------
2 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/src/bin/pg_basebackup/t/010_pg_basebackup.pl
b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
index 208df557b8..a10d201378 100644
--- a/src/bin/pg_basebackup/t/010_pg_basebackup.pl
+++ b/src/bin/pg_basebackup/t/010_pg_basebackup.pl
@@ -211,11 +211,11 @@
'pg_basebackup tar with long name fails');
unlink "$pgdata/$superlongname";
-# The following tests test symlinks. Windows doesn't have symlinks, so
-# skip on Windows.
+# The following tests need some work to work correctly on Windows, so
+# skip for now.
SKIP:
{
- skip "symlinks not supported on Windows", 18 if ($windows_os);
+ skip "symlink tests not supported on Windows", 18 if ($windows_os);
# Move pg_replslot out of $pgdata and create a symlink to it.
$node->stop;
diff --git a/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl
b/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl
index 639eeb9c91..e271a4ab16 100644
--- a/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl
+++ b/src/bin/pg_rewind/t/004_pg_xlog_symlink.pl
@@ -6,16 +6,7 @@
use File::Copy;
use File::Path qw(rmtree);
use TestLib;
-use Test::More;
-if ($windows_os)
-{
- plan skip_all => 'symlinks not supported on Windows';
- exit;
-}
-else
-{
- plan tests => 5;
-}
+use Test::More tests => 5;
use FindBin;
use lib $FindBin::RealBin;
--
2.27.0