mirror of
https://github.com/postgres/postgres.git
synced 2025-08-22 21:53:06 +03:00
Fix python regression testing script to bail out early if language
creation fails ... no point in running the tests.
This commit is contained in:
@@ -4,15 +4,24 @@ DBNAME=pltest
|
|||||||
|
|
||||||
echo -n "*** Destroy $DBNAME."
|
echo -n "*** Destroy $DBNAME."
|
||||||
dropdb $DBNAME > test.log 2>&1
|
dropdb $DBNAME > test.log 2>&1
|
||||||
|
# drop failure is ok...
|
||||||
echo " Done. ***"
|
echo " Done. ***"
|
||||||
|
|
||||||
echo -n "*** Create $DBNAME."
|
echo -n "*** Create $DBNAME."
|
||||||
createdb $DBNAME >> test.log 2>&1
|
if createdb $DBNAME >> test.log 2>&1 ; then
|
||||||
echo " Done. ***"
|
echo " Done. ***"
|
||||||
|
else
|
||||||
|
echo " Failed! See test.log. ***"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo -n "*** Create plpython."
|
echo -n "*** Create plpython."
|
||||||
createlang plpythonu $DBNAME >> test.log 2>&1
|
if createlang plpythonu $DBNAME >> test.log 2>&1 ; then
|
||||||
echo " Done. ***"
|
echo " Done. ***"
|
||||||
|
else
|
||||||
|
echo " Failed! See test.log. ***"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
echo -n "*** Create tables"
|
echo -n "*** Create tables"
|
||||||
psql -q $DBNAME < plpython_schema.sql >> test.log 2>&1
|
psql -q $DBNAME < plpython_schema.sql >> test.log 2>&1
|
||||||
|
Reference in New Issue
Block a user