From: Sandro Santilli Date: Wed, 16 Feb 2011 10:19:28 +0000 (+0000) Subject: Stop on first error when creating the regress db X-Git-Tag: 2.0.0alpha1~1971 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c55e5905452f3d1b36845ba1dc34ea18a873a280;p=postgis Stop on first error when creating the regress db git-svn-id: http://svn.osgeo.org/postgis/trunk@6829 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/regress/run_test b/regress/run_test index 831d52bc5..ee6548f43 100755 --- a/regress/run_test +++ b/regress/run_test @@ -409,13 +409,16 @@ if test -z "$db_exists"; then if test x"$OPT_CREATE" = "xyes"; then echo "Creating spatial db ${DB} " + # ON_ERROR_STOP is used by psql to return non-0 on an error + _psql_opts="--no-psqlrc --variable ON_ERROR_STOP=true" + createdb "${DB}" > ${TMPDIR}/regress_log createlang plpgsql "${DB}" >> ${TMPDIR}/regress_log - ${PSQL} -Xf ${REGDIR}/postgis.sql "${DB}" >> ${TMPDIR}/regress_log 2>&1 + ${PSQL} ${_psql_opts} -Xf ${REGDIR}/postgis.sql "${DB}" >> ${TMPDIR}/regress_log 2>&1 if test x"$OPT_WITH_TOPO" = "xyes"; then if test -e ${REGDIR}/../topology/topology.sql; then echo "Adding topology support" - ${PSQL} -Xf ${REGDIR}/../topology/topology.sql "${DB}" >> ${TMPDIR}/regress_log 2>&1 + ${PSQL} ${_psql_opts} -Xf ${REGDIR}/../topology/topology.sql "${DB}" >> ${TMPDIR}/regress_log 2>&1 else echo "Topology support skipped (topology.sql not found)" fi