added minmax
[pspp-builds.git] / tests / bugs / data-crash.sh
index 66b67f76e49f8d442234d2b8027823839357f712..dd86502847bdf1d39bd89027e6f2d7ec00d5a9ae 100755 (executable)
@@ -6,10 +6,14 @@
 TEMPDIR=/tmp/pspp-tst-$$
 TESTFILE=$TEMPDIR/`basename $0`.sps
 
-here=`pwd`;
+# ensure that top_builddir  are absolute
+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
 
 # ensure that top_srcdir is absolute
-cd $top_srcdir; top_srcdir=`pwd`
+top_srcdir=`cd $top_srcdir; pwd`
 
 STAT_CONFIG_PATH=$top_srcdir/config
 export STAT_CONFIG_PATH
@@ -17,6 +21,7 @@ export STAT_CONFIG_PATH
 
 cleanup()
 {
+     cd /
      rm -rf $TEMPDIR
 }
 
@@ -58,8 +63,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 #This must fail
 activity="run program"
-$SUPERVISOR $here/../src/pspp $TEMPDIR/ct.stat > /dev/null
+$SUPERVISOR $PSPP -e /dev/null $TEMPDIR/ct.stat 
 if [ $? -ne 1 ] ; then fail ; fi
 
-
 pass;