X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fstats%2Fdescript-missing.sh;h=adc5a7bad23f1ef0ee096a69a42d7db71451f42f;hb=dcf9b154cbcaa35c3d8459a201b77eec8bcb30bd;hp=ae8bc5a0c9d4f72aa5b70057f171cb14b073010d;hpb=7f3ac8559f71179a95fad28a30882ca476d8ac99;p=pspp diff --git a/tests/stats/descript-missing.sh b/tests/stats/descript-missing.sh index ae8bc5a0c9..adc5a7bad2 100755 --- a/tests/stats/descript-missing.sh +++ b/tests/stats/descript-missing.sh @@ -4,10 +4,13 @@ TEMPDIR=/tmp/pspp-tst-$$ -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 @@ -15,6 +18,7 @@ export STAT_CONFIG_PATH cleanup() { + cd / rm -rf $TEMPDIR } @@ -72,12 +76,13 @@ if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/descript.stat +$SUPERVISOR $top_builddir/src/pspp -o raw-ascii $TEMPDIR/descript.stat if [ $? -ne 0 ] ; then no_result ; fi activity="compare output" -diff -B -b $TEMPDIR/pspp.list - <