X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Faggregate.sh;h=48b0ef6e39f9d844e5f452d33dfd8daf693e1d1d;hb=refs%2Ftags%2Ffc11-i386-build74;hp=c6f48ae913e30f49604296441f2ffc239fcb8f77;hpb=7f3ac8559f71179a95fad28a30882ca476d8ac99;p=pspp-builds.git diff --git a/tests/command/aggregate.sh b/tests/command/aggregate.sh index c6f48ae9..48b0ef6e 100755 --- a/tests/command/aggregate.sh +++ b/tests/command/aggregate.sh @@ -6,10 +6,12 @@ TEMPDIR=/tmp/pspp-tst-$$ TESTFILE=$TEMPDIR/aggregate.pspp -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 @@ -17,6 +19,11 @@ export STAT_CONFIG_PATH cleanup() { + if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then + echo "NOT cleaning $TEMPDIR" + return ; + fi + cd / rm -rf $TEMPDIR } @@ -139,6 +146,8 @@ cat > agg-skel.pspp < agg-skel.pspp < agg-itemwise.out < agg-itemwise.csv < agg-columnwise.out < agg-columnwise.csv < $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/^.*:\d+: //;' pspp.csv + diff -c pspp.csv agg-$missing.csv if [ $? -ne 0 ] ; then fail ; fi done done