X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Fcount.sh;h=05ee4430314c5e5842cfdf3633c68db518ad8806;hb=c59b9819031877e1837b1294bb23671bfde9b433;hp=7e9d7818773a34f7114eadfee95e329149c3e213;hpb=c48bf64ab648b9b761a8e0774db3672d8009c64c;p=pspp diff --git a/tests/command/count.sh b/tests/command/count.sh index 7e9d781877..05ee443031 100755 --- a/tests/command/count.sh +++ b/tests/command/count.sh @@ -3,17 +3,23 @@ # This program tests the count transformation 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` -export STAT_CONFIG_PATH=$top_srcdir/config +STAT_CONFIG_PATH=$top_srcdir/config +export STAT_CONFIG_PATH cleanup() { + cd / rm -rf $TEMPDIR } @@ -45,11 +51,11 @@ mkdir -p $TEMPDIR cd $TEMPDIR -cat > $TEMPDIR/count.stat < $TESTFILE <