Checkin of new directory structure.
[pspp-builds.git] / tests / bugs / data-crash.sh
index 1c55bca48b77cca89d13a1db30ed0ddc1162af59..3ebde4fb520c4f5a7245cfe1c51c986c15eb6273 100755 (executable)
@@ -6,10 +6,13 @@
 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`
 
 # 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
@@ -59,7 +62,7 @@ if [ $? -ne 0 ] ; then no_result ; fi
 
 #This must fail
 activity="run program"
-$SUPERVISOR $here/../src/pspp $TEMPDIR/ct.stat > /dev/null
+$SUPERVISOR $top_builddir/src/pspp $TEMPDIR/ct.stat > /dev/null
 if [ $? -ne 1 ] ; then fail ; fi