X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fbugs%2Funwritable-dir.sh;h=c7c09f74b81233109c5805f889d9fb42fe17320b;hb=173d1687aea88e0e5e1b1d8615ed68ebefb15d08;hp=705c45b91ec5a73f66549c429d60d07c0a9fb0f4;hpb=7158580a14ebc9c9b4e44a537ecb1ea878c9e646;p=pspp diff --git a/tests/bugs/unwritable-dir.sh b/tests/bugs/unwritable-dir.sh index 705c45b91e..c7c09f74b8 100755 --- a/tests/bugs/unwritable-dir.sh +++ b/tests/bugs/unwritable-dir.sh @@ -9,7 +9,7 @@ TEMPDIR=/tmp/pspp-tst-$$ if [ -z "$top_builddir" ] ; then top_builddir=. ; fi if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi top_builddir=`cd $top_builddir; pwd` -PSPP=$top_builddir/src/ui/terminal/pspp +PSPP=$top_builddir/src/ui/terminal/pspp$EXEEXT # ensure that top_srcdir is absolute top_srcdir=`cd $top_srcdir; pwd` @@ -20,6 +20,10 @@ export STAT_CONFIG_PATH cleanup() { + if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then + echo "NOT cleaning $TEMPDIR" + return ; + fi cd / chmod u+w $TEMPDIR rm -rf $TEMPDIR @@ -77,12 +81,12 @@ chmod u-w $TEMPDIR # on a single PSPP invocation, except that charts are only supported for # a single driver at a time, and we'd prefer to test chart support for # all of our driver types. -for driver in list-ascii list-ps html; do +for file in pspp.csv pspp.html pspp.odt pspp.pdf pspp.txt; do # PSPP will fail to create the output file. Currently this doesn't cause # PSPP's exit status to be nonzero, although this is arguably incorrect. # At any rate, PSPP should not crash. - activity="run pspp with $driver driver" - $SUPERVISOR $PSPP -o $driver test.pspp >/dev/null 2>&1 + activity="run pspp with $file driver" + $SUPERVISOR $PSPP -o $file test.pspp >/dev/null 2>&1 if [ $? -ne 0 ] ; then fail ; fi done