X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Faggregate.sh;h=63abc6f3b003ac093ee59434736522d9d64d27c8;hb=b5c82cc9aabe7e641011130240ae1b2e84348e23;hp=c2a4414c844378d1a8308b1dee5c95c58792fed4;hpb=a3154fa23baf5ca6b186e1b14803be6ca0ac2b2e;p=pspp-builds.git diff --git a/tests/command/aggregate.sh b/tests/command/aggregate.sh index c2a4414c..63abc6f3 100755 --- a/tests/command/aggregate.sh +++ b/tests/command/aggregate.sh @@ -6,16 +6,24 @@ TEMPDIR=/tmp/pspp-tst-$$ TESTFILE=$TEMPDIR/aggregate.pspp -here=`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 -# ensure that top_srcdir is absolute -cd $top_srcdir; top_srcdir=`pwd` - -export STAT_CONFIG_PATH=$top_srcdir/config +STAT_CONFIG_PATH=$top_srcdir/config +export STAT_CONFIG_PATH cleanup() { + if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then + echo "NOT cleaning $TEMPDIR" + return ; + fi + cd / rm -rf $TEMPDIR } @@ -68,110 +76,121 @@ activity="command skeleton create" cat > agg-skel.pspp < agg-itemwise.out < agg-columnwise.out < $name.pspp if [ $? -ne 0 ] ; then no_result ; fi activity="run $name.pspp" - $SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii $name.pspp >/dev/null 2>&1 + $SUPERVISOR $PSPP --testing-mode -e /dev/null $name.pspp if [ $? -ne 0 ] ; then no_result ; fi activity="check $name output" - diff -b -w -B pspp.list agg-$missing.out + perl -pi -e 's/^\s*$//g;s/^.*:\d+: //;' pspp.list agg-$missing.out + diff -b -w pspp.list agg-$missing.out if [ $? -ne 0 ] ; then fail ; fi done done