]> granicus.if.org Git - postgresql/commitdiff
Treat MINGW and MSYS the same in pg_upgrade test script
authorAndrew Dunstan <andrew@dunslane.net>
Mon, 26 Aug 2019 11:44:34 +0000 (07:44 -0400)
committerAndrew Dunstan <andrew@dunslane.net>
Mon, 26 Aug 2019 11:47:41 +0000 (07:47 -0400)
On msys2, 'uname -s' reports a string starting MSYS instead on MINGW
as happens on msys1. Treat these both the same way. This reverts
608a710195a4b in favor of a more general solution.

Backpatch to all live branches.

src/bin/pg_upgrade/test.sh

index 3f98158dde3077ac621055e144cd502db0b2c1a2..30e5eedc6d8e0bb4f380bbcccb69d37df6b66d49 100644 (file)
@@ -29,11 +29,13 @@ standard_initdb() {
        ../../test/regress/pg_regress --config-auth "$PGDATA"
 }
 
-# Establish how the server will listen for connections
-testhost=`uname -s`
+# What flavor of host are we on?
+# Treat MINGW* (msys1) and MSYS* (msys2) the same.
+testhost=`uname -s | sed s/^MSYS/MINGW/`
 
+# Establish how the server will listen for connections
 case $testhost in
-       MINGW*|MSYS*)
+       MINGW*)
                LISTEN_ADDRESSES="localhost"
                PGHOST=localhost
                ;;