X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Fsplit-file.sh;h=eb2c991c1e97d328d120c76fe9915c67fbde93d3;hb=1fe8ef2486ef1e853d68bbab967ccb812900128f;hp=f9ae79abab3e93923a86e42701fa9c2229605118;hpb=44d7b18d5c3d0a806fe1a29658445254f2376600;p=pspp-builds.git diff --git a/tests/command/split-file.sh b/tests/command/split-file.sh index f9ae79ab..eb2c991c 100755 --- a/tests/command/split-file.sh +++ b/tests/command/split-file.sh @@ -5,17 +5,28 @@ 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` 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 } @@ -74,14 +85,14 @@ EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$SUPERVISOR $here/../src/pspp -o raw-ascii $TEMPDIR/split.stat +$SUPERVISOR $PSPP --testing-mode $TEMPDIR/split.stat if [ $? -ne 0 ] ; then no_result ; fi activity="compare results" -diff -B -b $TEMPDIR/pspp.list - <