X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fbugs%2Frandom.sh;h=716ed33c7db20b31b0fded64c6c60133c306f12e;hb=964bc1c0e1b3e490a893583e0598418ce25d5f14;hp=869928d64ad834940d2615bd7db287f7bbba9f04;hpb=65a4e29574b67921ea899b6a1d45806dca11db00;p=pspp diff --git a/tests/bugs/random.sh b/tests/bugs/random.sh index 869928d64a..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 } @@ -64,42 +68,42 @@ input program. + end case. + end loop. + end file. -end input program. +end input program. list. EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$SUPERVISOR $PSPP -o raw-ascii $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