mirror of
https://github.com/postgres/postgres.git
synced 2025-05-05 09:19:17 +03:00
Use a more portable platform test.
This commit is contained in:
parent
e7bab081a9
commit
f61013a438
@ -15,7 +15,7 @@ set -e
|
|||||||
: ${PGPORT=50432}
|
: ${PGPORT=50432}
|
||||||
export PGPORT
|
export PGPORT
|
||||||
|
|
||||||
testhost=`uname -o`
|
testhost=`uname -s`
|
||||||
|
|
||||||
temp_root=$PWD/tmp_check
|
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
|
pg_ctl start -l "$logdir/postmaster2.log" -w
|
||||||
|
|
||||||
if [ $testhost = Msys ] ; then
|
case $testhost in
|
||||||
cmd /c analyze_new_cluster.bat
|
MINGW*) cmd /c analyze_new_cluster.bat ;;
|
||||||
else
|
*) sh ./analyze_new_cluster.sh ;;
|
||||||
sh ./analyze_new_cluster.sh
|
esac
|
||||||
fi
|
|
||||||
pg_dumpall -f "$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
|
||||||
@ -122,11 +122,10 @@ if [ -n "$pg_dumpall2_status" ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $testhost = Msys ] ; then
|
case $testhost in
|
||||||
cmd /c delete_old_cluster.bat
|
MINGW*) cmd /c delete_old_cluster.bat ;;
|
||||||
else
|
*) sh ./delete_old_cluster.sh ;;
|
||||||
sh ./delete_old_cluster.sh
|
esac
|
||||||
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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user