aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2012-09-03 22:32:17 -0400
committerAndrew Dunstan <andrew@dunslane.net>2012-09-03 22:32:17 -0400
commite442b0f0c6fd26738bafdeb5222511b586dfe4b9 (patch)
tree880c59457902e395b5199d2dab0cf44fb1d2531f
parenta80b8037cfc24a4fa75ba267b6d39cba105ad4d6 (diff)
downloadpostgresql-e442b0f0c6fd26738bafdeb5222511b586dfe4b9.tar.gz
postgresql-e442b0f0c6fd26738bafdeb5222511b586dfe4b9.zip
Allow pg_upgrade "make check" to run on Windows/MSys.
Backpatch to 9.2.
-rw-r--r--contrib/pg_upgrade/test.sh19
1 files changed, 17 insertions, 2 deletions
diff --git a/contrib/pg_upgrade/test.sh b/contrib/pg_upgrade/test.sh
index 31e30af7774..d411ac60acc 100644
--- a/contrib/pg_upgrade/test.sh
+++ b/contrib/pg_upgrade/test.sh
@@ -15,6 +15,8 @@ set -e
: ${PGPORT=50432}
export PGPORT
+testhost=`uname -o`
+
temp_root=$PWD/tmp_check
if [ "$1" = '--install' ]; then
@@ -107,7 +109,12 @@ initdb
pg_upgrade -d "${PGDATA}.old" -D "${PGDATA}" -b "$oldbindir" -B "$bindir"
pg_ctl start -l "$logdir/postmaster2.log" -w
-sh ./analyze_new_cluster.sh
+
+if [ $testhost = Msys ] ; then
+ cmd /c analyze_new_cluster.bat
+else
+ sh ./analyze_new_cluster.sh
+fi
pg_dumpall >"$temp_root"/dump2.sql || pg_dumpall2_status=$?
pg_ctl -m fast stop
if [ -n "$pg_dumpall2_status" ]; then
@@ -115,7 +122,15 @@ if [ -n "$pg_dumpall2_status" ]; then
exit 1
fi
-sh ./delete_old_cluster.sh
+if [ $testhost = Msys ] ; then
+ cmd /c delete_old_cluster.bat
+else
+ sh ./delete_old_cluster.sh
+fi
+
+if [ $testhost = Msys ] ; then
+ dos2unix "$temp_root"/dump1.sql "$temp_root"/dump2.sql
+fi
if diff -q "$temp_root"/dump1.sql "$temp_root"/dump2.sql; then
echo PASSED