aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Dunstan <andrew@dunslane.net>2012-09-05 18:00:31 -0400
committerAndrew Dunstan <andrew@dunslane.net>2012-09-05 18:00:31 -0400
commitf8f5cf33a30a2f6eeeb839ce92cb6ee04b518c5a (patch)
treecd2e8d1209f97750ec642fcfb2e960fd4472c12d
parentea0b414a0d9caaad1b7f39acd57708895c4dd0f3 (diff)
downloadpostgresql-f8f5cf33a30a2f6eeeb839ce92cb6ee04b518c5a.tar.gz
postgresql-f8f5cf33a30a2f6eeeb839ce92cb6ee04b518c5a.zip
Fix pg_upgrade test script's line end handling on Windows.
Call pg_dumpall using -f switch instead of redirection, to avoid writing the output in text mode and generating spurious carriage returns. Remove to carriage return ignoring hack introduced by commit e442b0f0c6fd26738bafdeb5222511b586dfe4b9. Backpatch to 9.2.
-rw-r--r--contrib/pg_upgrade/test.sh8
1 files changed, 2 insertions, 6 deletions
diff --git a/contrib/pg_upgrade/test.sh b/contrib/pg_upgrade/test.sh
index d411ac60acc..2d2cf64dcf9 100644
--- a/contrib/pg_upgrade/test.sh
+++ b/contrib/pg_upgrade/test.sh
@@ -67,7 +67,7 @@ set -x
$oldbindir/initdb
$oldbindir/pg_ctl start -l "$logdir/postmaster1.log" -w
if "$MAKE" -C "$oldsrc" installcheck; then
- pg_dumpall >"$temp_root"/dump1.sql || pg_dumpall1_status=$?
+ pg_dumpall -f "$temp_root"/dump1.sql || pg_dumpall1_status=$?
if [ "$newsrc" != "$oldsrc" ]; then
oldpgversion=`psql -A -t -d regression -c "SHOW server_version_num"`
fix_sql=""
@@ -115,7 +115,7 @@ if [ $testhost = Msys ] ; then
else
sh ./analyze_new_cluster.sh
fi
-pg_dumpall >"$temp_root"/dump2.sql || pg_dumpall2_status=$?
+pg_dumpall -f "$temp_root"/dump2.sql || pg_dumpall2_status=$?
pg_ctl -m fast stop
if [ -n "$pg_dumpall2_status" ]; then
echo "pg_dumpall of post-upgrade database cluster failed"
@@ -128,10 +128,6 @@ 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
exit 0