From: Andrew Dunstan <andrew@dunslane.net>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Enable almost all TAP tests involving symlinks on Windows
Date: Thu, 16 Jul 2020 19:52:11 +0000
Message-ID: <E1jw9vP-0005pQ-Pd@gemulon.postgresql.org> (raw)
Enable almost all TAP tests involving symlinks on Windows
Windows has junction points which function as symbolic links for
directories. This patch introduces a new function TestLib::dir_symlink()
which creates a junction point on Windows and a standard Unix type
symbolic link elsewhere.
The function TestLib::perl2host is also modified, first to use cygpath
where it's available (e.g. msys2) and second to allow it to succeed if
the gandparent directory exists but the parent does not.
Given these changes the only symlink tests that need to be skipped on
Windows are those related to permissions or to use of readlink. The
relevant tests for pg_basebackup and pg_rewind are therefore adjusted
accordingly.
Andrew Dunstan, reviewed by Peter Eisentraut and Michael Paquier.
Discussion: https://postgr.es/m/c50a646c-d9bb-7c62-a4bf-8256ff6ff338@2ndquadrant.com
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/d66b23b032d75614e1be47ca182020960d89206d
Modified Files
--------------
src/bin/pg_basebackup/t/010_pg_basebackup.pl | 280 ++++++++++++++-------------
src/bin/pg_dump/t/010_dump_connstr.pl | 4 +-
src/bin/pg_rewind/t/004_pg_xlog_symlink.pl | 13 +-
src/test/perl/TestLib.pm | 73 ++++++-
4 files changed, 218 insertions(+), 152 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: andrew@dunslane.net
Subject: Re: pgsql: Enable almost all TAP tests involving symlinks on Windows
In-Reply-To: <E1jw9vP-0005pQ-Pd@gemulon.postgresql.org>
References: <E1jw9vP-0005pQ-Pd@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox