]> granicus.if.org Git - postgis/commitdiff
Make sure the regress tmp directory exists before trying to write to it.
authorPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 24 Feb 2012 18:49:09 +0000 (18:49 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Fri, 24 Feb 2012 18:49:09 +0000 (18:49 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@9287 b70326c6-7e19-0410-871a-916f4a2858ee

regress/run_test

index c4dea7cd3afe3b0225da6380f1732be78ff159d2..94ed0001588f229398f39ed362a8fa9837091f57 100755 (executable)
@@ -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"