X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Ferase.sh;h=bbb094e14e0ad16e49ac8402645335f1329f0c97;hb=0db7a98b55853dd99701c95dffb3ecb97cee5343;hp=760ac7d881376098e742f4d7e8e855dd9456f85d;hpb=a19e7749cdb8713316fde220f2fc9a5ad5dc79ed;p=pspp-builds.git diff --git a/tests/command/erase.sh b/tests/command/erase.sh index 760ac7d8..bbb094e1 100755 --- a/tests/command/erase.sh +++ b/tests/command/erase.sh @@ -5,16 +5,22 @@ 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` -export STAT_CONFIG_PATH=$top_srcdir/config +STAT_CONFIG_PATH=$top_srcdir/config +export STAT_CONFIG_PATH cleanup() { + cd / rm -rf $TEMPDIR } @@ -71,7 +77,7 @@ if [ ! -f $TEMPDIR/foobar ] ; then fail ; fi # This command must fail activity="run prog 1" -$SUPERVISOR $here/../src/pspp $TESTFILE > /dev/null +$SUPERVISOR $PSPP -e /dev/null $TESTFILE if [ $? -eq 0 ] ; then fail ; fi @@ -85,7 +91,7 @@ if [ $? -ne 0 ] ; then no_result ; fi activity="run prog 1" -$SUPERVISOR $here/../src/pspp $TESTFILE +$SUPERVISOR $PSPP $TESTFILE if [ $? -ne 0 ] ; then fail ; fi # foobar should now be gone