On 2020-07-10 13:58, Andrew Dunstan wrote:
After much frustration and gnashing of teeth here's a patch that allows almost all the TAP tests involving symlinks to work as expected on all Windows build environments, without requiring an additional Perl module. I have tested this on a system that is very similar to that running drongo and fairywren, with both msys2 and MSVC builds.
Thanks. This patch works for me in my environment. The code changes look very clean, so it seems like a good improvement.
Attached is a small fixup patch for some typos and a stray debug message. A perltidy run might be worthwhile, as Michael already mentioned. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
>From 61fc47e7fd82f65ada6a25ddb9ea0458da8e6d5e Mon Sep 17 00:00:00 2001 From: Peter Eisentraut <pe...@eisentraut.org> Date: Tue, 14 Jul 2020 09:11:42 +0200 Subject: [PATCH] fixup! win-tap-symlink-2.patch --- doc/src/sgml/regress.sgml | 2 +- src/test/perl/TestLib.pm | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/src/sgml/regress.sgml b/doc/src/sgml/regress.sgml index e6e2b2762d..4e370aeae4 100644 --- a/doc/src/sgml/regress.sgml +++ b/doc/src/sgml/regress.sgml @@ -775,7 +775,7 @@ <title>TAP Tests</title> <para> The TAP tests require the Perl module <literal>IPC::Run</literal>. This module is available from CPAN or an operating system package. - On Windows, <literal>Win32API::File</literal> is also required . + On Windows, <literal>Win32API::File</literal> is also required. </para> <para> diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm index 207e92fdc0..d595c7e3c2 100644 --- a/src/test/perl/TestLib.pm +++ b/src/test/perl/TestLib.pm @@ -630,7 +630,7 @@ sub check_pg_config =item dir_symlink(oldname, newname) -Portably create a symlink for a director. On Windows this creates a junction. +Portably create a symlink for a directory. On Windows this creates a junction. Elsewhere it just calls perl's builtin symlink. =cut @@ -651,7 +651,6 @@ sub dir_symlink # need some indirection on msys $cmd = qq{echo '$cmd' | \$COMSPEC /Q}; } - note("dir_symlink cmd: $cmd"); system($cmd); } else -- 2.27.0