diff options
author | Andrew Dunstan <andrew@dunslane.net> | 2012-10-18 16:15:49 -0400 |
---|---|---|
committer | Andrew Dunstan <andrew@dunslane.net> | 2012-10-18 16:15:49 -0400 |
commit | f61013a438f255b386c9bf7dcae32f3dcf5d5b2e (patch) | |
tree | e907531514438b4aa3311f86c6521037642403f2 | |
parent | e7bab081a9f726fa8cd910bd7e2567423383b44b (diff) |
Use a more portable platform test.
-rw-r--r-- | contrib/pg_upgrade/test.sh | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/contrib/pg_upgrade/test.sh b/contrib/pg_upgrade/test.sh index 2d2cf64dcf9..ffa5a089150 100644 --- a/contrib/pg_upgrade/test.sh +++ b/contrib/pg_upgrade/test.sh @@ -15,7 +15,7 @@ set -e : ${PGPORT=50432} export PGPORT -testhost=`uname -o` +testhost=`uname -s` temp_root=$PWD/tmp_check @@ -110,11 +110,11 @@ pg_upgrade -d "${PGDATA}.old" -D "${PGDATA}" -b "$oldbindir" -B "$bindir" pg_ctl start -l "$logdir/postmaster2.log" -w -if [ $testhost = Msys ] ; then - cmd /c analyze_new_cluster.bat -else - sh ./analyze_new_cluster.sh -fi +case $testhost in + MINGW*) cmd /c analyze_new_cluster.bat ;; + *) sh ./analyze_new_cluster.sh ;; +esac + pg_dumpall -f "$temp_root"/dump2.sql || pg_dumpall2_status=$? pg_ctl -m fast stop if [ -n "$pg_dumpall2_status" ]; then @@ -122,11 +122,10 @@ if [ -n "$pg_dumpall2_status" ]; then exit 1 fi -if [ $testhost = Msys ] ; then - cmd /c delete_old_cluster.bat -else - sh ./delete_old_cluster.sh -fi +case $testhost in + MINGW*) cmd /c delete_old_cluster.bat ;; + *) sh ./delete_old_cluster.sh ;; +esac if diff -q "$temp_root"/dump1.sql "$temp_root"/dump2.sql; then echo PASSED |