From c55e5905452f3d1b36845ba1dc34ea18a873a280 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Wed, 16 Feb 2011 10:19:28 +0000 Subject: [PATCH] Stop on first error when creating the regress db git-svn-id: http://svn.osgeo.org/postgis/trunk@6829 b70326c6-7e19-0410-871a-916f4a2858ee --- regress/run_test | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 -- 2.50.1