X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fbugs%2Fexamine-1sample.sh;h=f775ae95fdc97ecb1c232cb2cec69140151a1025;hb=dcf9b154cbcaa35c3d8459a201b77eec8bcb30bd;hp=c34657b9a8250ecaeb9dcfcf1fcb6651286b243e;hpb=7f3ac8559f71179a95fad28a30882ca476d8ac99;p=pspp diff --git a/tests/bugs/examine-1sample.sh b/tests/bugs/examine-1sample.sh index c34657b9a8..f775ae95fd 100755 --- a/tests/bugs/examine-1sample.sh +++ b/tests/bugs/examine-1sample.sh @@ -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 @@ -17,6 +20,7 @@ export STAT_CONFIG_PATH cleanup() { + cd / rm -rf $TEMPDIR } @@ -64,7 +68,7 @@ EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$SUPERVISOR $here/../src/pspp -o raw-ascii $TESTFILE +$SUPERVISOR $top_builddir/src/pspp -o raw-ascii $TESTFILE if [ $? -ne 0 ] ; then fail ; fi pass