Fix python regression testing script to bail out early if language
authorTom Lane
Thu, 24 Mar 2005 17:23:34 +0000 (17:23 +0000)
committerTom Lane
Thu, 24 Mar 2005 17:23:34 +0000 (17:23 +0000)
creation fails ... no point in running the tests.

src/pl/plpython/test.sh

index 5cc677c33cd5f42599168a59b3e0e2a67a357a09..facf29e2680fd52fe0227687461e38f0f048eb1c 100755 (executable)
@@ -4,15 +4,24 @@ DBNAME=pltest
 
 echo -n "*** Destroy $DBNAME."
 dropdb $DBNAME > test.log 2>&1
+# drop failure is ok...
 echo " Done. ***"
 
 echo -n "*** Create $DBNAME."
-createdb $DBNAME >> test.log 2>&1
-echo " Done. ***"
+if createdb $DBNAME >> test.log 2>&1 ; then
+  echo " Done. ***"
+else
+  echo " Failed!  See test.log. ***"
+  exit 1
+fi
 
 echo -n "*** Create plpython."
-createlang plpythonu $DBNAME >> test.log 2>&1
-echo " Done. ***"
+if createlang plpythonu $DBNAME >> test.log 2>&1 ; then
+  echo " Done. ***"
+else
+  echo " Failed!  See test.log. ***"
+  exit 1
+fi
 
 echo -n "*** Create tables"
 psql -q $DBNAME < plpython_schema.sql >> test.log 2>&1