Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit f8f5cf3

Browse files
committed
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 e442b0f. Backpatch to 9.2.
1 parent ea0b414 commit f8f5cf3

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

contrib/pg_upgrade/test.sh

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ set -x
6767
$oldbindir/initdb
6868
$oldbindir/pg_ctl start -l "$logdir/postmaster1.log" -w
6969
if "$MAKE" -C "$oldsrc" installcheck; then
70-
pg_dumpall >"$temp_root"/dump1.sql || pg_dumpall1_status=$?
70+
pg_dumpall -f "$temp_root"/dump1.sql || pg_dumpall1_status=$?
7171
if [ "$newsrc" != "$oldsrc" ]; then
7272
oldpgversion=`psql -A -t -d regression -c "SHOW server_version_num"`
7373
fix_sql=""
@@ -115,7 +115,7 @@ if [ $testhost = Msys ] ; then
115115
else
116116
sh ./analyze_new_cluster.sh
117117
fi
118-
pg_dumpall >"$temp_root"/dump2.sql || pg_dumpall2_status=$?
118+
pg_dumpall -f "$temp_root"/dump2.sql || pg_dumpall2_status=$?
119119
pg_ctl -m fast stop
120120
if [ -n "$pg_dumpall2_status" ]; then
121121
echo "pg_dumpall of post-upgrade database cluster failed"
@@ -128,10 +128,6 @@ else
128128
sh ./delete_old_cluster.sh
129129
fi
130130

131-
if [ $testhost = Msys ] ; then
132-
dos2unix "$temp_root"/dump1.sql "$temp_root"/dump2.sql
133-
fi
134-
135131
if diff -q "$temp_root"/dump1.sql "$temp_root"/dump2.sql; then
136132
echo PASSED
137133
exit 0

0 commit comments

Comments
 (0)