mirror of
https://github.com/postgres/postgres.git
synced 2025-06-25 01:02:05 +03:00
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 e442b0f0c6
.
Backpatch to 9.2.
This commit is contained in:
@ -67,7 +67,7 @@ set -x
|
|||||||
$oldbindir/initdb
|
$oldbindir/initdb
|
||||||
$oldbindir/pg_ctl start -l "$logdir/postmaster1.log" -w
|
$oldbindir/pg_ctl start -l "$logdir/postmaster1.log" -w
|
||||||
if "$MAKE" -C "$oldsrc" installcheck; then
|
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
|
if [ "$newsrc" != "$oldsrc" ]; then
|
||||||
oldpgversion=`psql -A -t -d regression -c "SHOW server_version_num"`
|
oldpgversion=`psql -A -t -d regression -c "SHOW server_version_num"`
|
||||||
fix_sql=""
|
fix_sql=""
|
||||||
@ -115,7 +115,7 @@ if [ $testhost = Msys ] ; then
|
|||||||
else
|
else
|
||||||
sh ./analyze_new_cluster.sh
|
sh ./analyze_new_cluster.sh
|
||||||
fi
|
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
|
pg_ctl -m fast stop
|
||||||
if [ -n "$pg_dumpall2_status" ]; then
|
if [ -n "$pg_dumpall2_status" ]; then
|
||||||
echo "pg_dumpall of post-upgrade database cluster failed"
|
echo "pg_dumpall of post-upgrade database cluster failed"
|
||||||
@ -128,10 +128,6 @@ else
|
|||||||
sh ./delete_old_cluster.sh
|
sh ./delete_old_cluster.sh
|
||||||
fi
|
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
|
if diff -q "$temp_root"/dump1.sql "$temp_root"/dump2.sql; then
|
||||||
echo PASSED
|
echo PASSED
|
||||||
exit 0
|
exit 0
|
||||||
|
Reference in New Issue
Block a user