git.postgresql.org Git - postgresql.git/commitdiff

git projects / postgresql.git / commitdiff
? search:
summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fefce9e)
Improve msys2 detection for TAP tests
2022年1月27日 13:17:42 +0000 (08:17 -0500)
2022年1月27日 13:27:56 +0000 (08:27 -0500)
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.


diff --git a/src/test/perl/PostgreSQL/Test/Utils.pm b/src/test/perl/PostgreSQL/Test/Utils.pm
index 3da04b3b6cc3287e1d98107c3d979246dfcacd6b..57fcb240898bb960ae42394f6adc47b01890b637 100644 (file)
--- 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)
{
This is the main PostgreSQL git repository.
RSS Atom

AltStyle によって変換されたページ (->オリジナル) /