mirror of
https://github.com/postgres/postgres.git
synced 2025-06-25 01:02:05 +03:00
Minor improvements to mbregress.sh script.
1. Use new dropdb --if-exists option, to avoid alarming the user if the database being dropped doesn't already exist. 2. Bail out if createdb fails. 3. exit 1 if the checks fail. 4. Make it executable. Josh Kupershmidt, with some kibitzing by me.
This commit is contained in:
9
src/test/mb/mbregress.sh
Normal file → Executable file
9
src/test/mb/mbregress.sh
Normal file → Executable file
@ -14,11 +14,13 @@ if [ ! -d results ];then
|
|||||||
mkdir results
|
mkdir results
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dropdb utf8
|
dropdb --if-exists utf8
|
||||||
createdb -T template0 -l C -E UTF8 utf8
|
createdb -T template0 -l C -E UTF8 utf8 || exit 1
|
||||||
|
|
||||||
PSQL="psql -n -e -q"
|
PSQL="psql -n -e -q"
|
||||||
tests="euc_jp sjis euc_kr euc_cn euc_tw big5 utf8 mule_internal"
|
tests="euc_jp sjis euc_kr euc_cn euc_tw big5 utf8 mule_internal"
|
||||||
|
EXITCODE=0
|
||||||
|
|
||||||
unset PGCLIENTENCODING
|
unset PGCLIENTENCODING
|
||||||
for i in $tests
|
for i in $tests
|
||||||
do
|
do
|
||||||
@ -54,7 +56,10 @@ do
|
|||||||
echo "----------------------"; \
|
echo "----------------------"; \
|
||||||
echo "" ) >> regression.diffs
|
echo "" ) >> regression.diffs
|
||||||
echo failed
|
echo failed
|
||||||
|
EXITCODE=1
|
||||||
else
|
else
|
||||||
echo ok
|
echo ok
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
exit $EXITCODE
|
||||||
|
Reference in New Issue
Block a user