Skip to content

Commit 7e1c6f1

Browse files
committed
Fix python regression testing script to bail out early if language
creation fails ... no point in running the tests.
1 parent 00aa8ed commit 7e1c6f1

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/pl/plpython/test.sh

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,24 @@ DBNAME=pltest
44

55
echo -n "*** Destroy $DBNAME."
66
dropdb $DBNAME > test.log 2>&1
7+
# drop failure is ok...
78
echo " Done. ***"
89

910
echo -n "*** Create $DBNAME."
10-
createdb $DBNAME >> test.log 2>&1
11-
echo " Done. ***"
11+
if createdb $DBNAME >> test.log 2>&1 ; then
12+
echo " Done. ***"
13+
else
14+
echo " Failed! See test.log. ***"
15+
exit 1
16+
fi
1217

1318
echo -n "*** Create plpython."
14-
createlang plpythonu $DBNAME >> test.log 2>&1
15-
echo " Done. ***"
19+
if createlang plpythonu $DBNAME >> test.log 2>&1 ; then
20+
echo " Done. ***"
21+
else
22+
echo " Failed! See test.log. ***"
23+
exit 1
24+
fi
1625

1726
echo -n "*** Create tables"
1827
psql -q $DBNAME < plpython_schema.sql >> test.log 2>&1

0 commit comments

Comments
 (0)