diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2022-01-27 08:17:42 -0500 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2022-01-27 08:27:56 -0500 |
commit | acea505186e65dff33db69517d36a02c7b4f0283 (patch) | |
tree | dc7f496fe5fd79ace68b1e95eb02b7f178b9dc57 /src/test/perl/PostgreSQL/Test/Utils.pm | |
parent | fefce9ef987ea00cd963f679223fdb9d381b9ec5 (diff) | |
download | postgresql-acea505186e65dff33db69517d36a02c7b4f0283.tar.gz postgresql-acea505186e65dff33db69517d36a02c7b4f0283.zip |
Improve msys2 detection for TAP tests
Perl instances on some msys toolchains (e.g. UCRT64) have their
configured osname set to 'MSWin32' rather than 'msys'. The test for
the msys2 platform is adjusted accordingly.
Backpatch to release 14.
Diffstat (limited to 'src/test/perl/PostgreSQL/Test/Utils.pm')
-rw-r--r-- | src/test/perl/PostgreSQL/Test/Utils.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/perl/PostgreSQL/Test/Utils.pm b/src/test/perl/PostgreSQL/Test/Utils.pm index 3da04b3b6cc..57fcb240898 100644 --- a/src/test/perl/PostgreSQL/Test/Utils.pm +++ b/src/test/perl/PostgreSQL/Test/Utils.pm @@ -142,7 +142,8 @@ BEGIN # Must be set early $windows_os = $Config{osname} eq 'MSWin32' || $Config{osname} eq 'msys'; # Check if this environment is MSYS2. - $is_msys2 = $^O eq 'msys' && `uname -or` =~ /^[2-9].*Msys/; + $is_msys2 = $windows_os && -x '/usr/bin/uname' && + `uname -or` =~ /^[2-9].*Msys/; if ($windows_os) { |