X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;ds=sidebyside;f=tests%2Fbugs%2Frandom.sh;h=716ed33c7db20b31b0fded64c6c60133c306f12e;hb=refs%2Fbuilds%2F20100922040502%2Fpspp;hp=c41dbf00504d556e9dd96601ee0fff9c4c214a51;hpb=9aff19b717bcc242e16d04c34f348fd79ebdd685;p=pspp diff --git a/tests/bugs/random.sh b/tests/bugs/random.sh index c41dbf0050..716ed33c7d 100755 --- a/tests/bugs/random.sh +++ b/tests/bugs/random.sh @@ -10,7 +10,7 @@ TESTFILE=$TEMPDIR/`basename $0`.sps 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 +PSPP=$top_builddir/src/ui/terminal/pspp$EXEEXT # ensure that top_srcdir is absolute top_srcdir=`cd $top_srcdir; pwd` @@ -21,6 +21,10 @@ export STAT_CONFIG_PATH cleanup() { + if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then + echo "NOT cleaning $TEMPDIR" + return ; + fi cd / rm -rf $TEMPDIR } @@ -71,35 +75,35 @@ EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$SUPERVISOR $PSPP --testing-mode $TESTFILE +$SUPERVISOR $PSPP -o pspp.csv $TESTFILE if [ $? -ne 0 ] ; then no_result ; fi activity="compare output" -perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list -diff -b -w $TEMPDIR/pspp.list - << EOF - R1 --------- - 7.71 - 2.99 - .21 - 4.95 - 6.34 - 4.43 - 7.49 - 8.32 - 4.99 - 5.83 - 2.25 - .25 - 1.98 - 7.09 - 7.61 - 2.66 - 1.69 - 2.64 - .88 - 1.50 +perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.csv +diff -b -w $TEMPDIR/pspp.csv - << EOF +Table: Data List +R1 +7.71 +2.99 +.21 +4.95 +6.34 +4.43 +7.49 +8.32 +4.99 +5.83 +2.25 +.25 +1.98 +7.09 +7.61 +2.66 +1.69 +2.64 +.88 +1.50 EOF if [ $? -ne 0 ] ; then fail ; fi