X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fexpressions%2Fvariables.sh;h=64ea80d119c30b8b098532f62f35d44813af0226;hb=f51ecb48027e6b1eb46840ae25888a25b429f012;hp=0d32df42c58a9faf76658e058a791684eec58a58;hpb=44d7b18d5c3d0a806fe1a29658445254f2376600;p=pspp-builds.git diff --git a/tests/expressions/variables.sh b/tests/expressions/variables.sh index 0d32df42..64ea80d1 100755 --- a/tests/expressions/variables.sh +++ b/tests/expressions/variables.sh @@ -4,17 +4,25 @@ TEMPDIR=/tmp/pspp-tst-$$ -here=`pwd`; - -# ensure that top_srcdir is absolute -cd $top_srcdir; top_srcdir=`pwd` +# ensure that top_srcdir and top_builddir are absolute +if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi +if [ -z "$top_builddir" ] ; then top_builddir=. ; fi +top_srcdir=`cd $top_srcdir; pwd` +top_builddir=`cd $top_builddir; pwd` +PSPP=$top_builddir/src/ui/terminal/pspp STAT_CONFIG_PATH=$top_srcdir/config export STAT_CONFIG_PATH +LANG=C +export LANG cleanup() { + if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then + echo "NOT cleaning $TEMPDIR" + return ; + fi cd / rm -rf $TEMPDIR } @@ -93,26 +101,23 @@ EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/variables.stat > $TEMPDIR/variables.err 2> $TEMPDIR/variables.out +$SUPERVISOR $PSPP -o pspp.csv $TEMPDIR/variables.stat > $TEMPDIR/variables.err 2> $TEMPDIR/variables.out if [ $? -ne 0 ] ; then fail ; fi activity="compare results" -diff -b -B $TEMPDIR/pspp.list - <