From: Paul Ramsey Date: Fri, 24 Feb 2012 18:49:09 +0000 (+0000) Subject: Make sure the regress tmp directory exists before trying to write to it. X-Git-Tag: 2.0.0beta1~69 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2231700fde2302250a98e6961baa582947a3b844;p=postgis Make sure the regress tmp directory exists before trying to write to it. git-svn-id: http://svn.osgeo.org/postgis/trunk@9287 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/regress/run_test b/regress/run_test index c4dea7cd3..94ed00015 100755 --- a/regress/run_test +++ b/regress/run_test @@ -199,6 +199,10 @@ run_simple_test () TMPFILE="${BETMPDIR}/test_${RUN}_tmp" DIFFILE="${TMPDIR}/test_${RUN}_diff" + if [ ! -d "${BETMPDIR}" ]; then + mkdir ${BETMPDIR} + fi + # Use intermediate file to prevent MingW buffering problems ${PSQL} -v "VERBOSITY=terse" -v "tmpfile='${TMPFILE}'" -tXA < "${_sql}" ${DB} 2>&1 \ | grep --binary-files=text -v "^$" \ @@ -220,7 +224,10 @@ run_simple_test () | sed 's/Self-intersection .*/Self-intersection/' \ | sed 's/^ROLLBACK/COMMIT/' \ > "${OUTFILE}" - rm -rf "${BETMPDIR}" # should we keep these ? + + if [ -d "${BETMPDIR}" ]; then + rm -rf "${BETMPDIR}" # should we keep these ? + fi if test x"$OPT_EXPECT" = "xyes"; then echo_inline " expected"