X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Fdo-repeat.sh;h=f5999dc7978332a7d48f562a2bcd3491dc720b76;hb=d019e8a29d7963a926837d46ae3592c5731f02e3;hp=452814fa182a6f3a417cf599c3f562ce09912b42;hpb=65a4e29574b67921ea899b6a1d45806dca11db00;p=pspp diff --git a/tests/command/do-repeat.sh b/tests/command/do-repeat.sh index 452814fa18..f5999dc797 100755 --- a/tests/command/do-repeat.sh +++ b/tests/command/do-repeat.sh @@ -9,7 +9,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` @@ -20,6 +20,10 @@ export STAT_CONFIG_PATH cleanup() { + if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then + echo "NOT cleaning $TEMPDIR" + return ; + fi cd / rm -rf $TEMPDIR } @@ -60,15 +64,15 @@ BEGIN DATA. 0 END DATA. -DO REPEAT h = h0 TO h3 / x = 0 1 2 3 / y = 8 TO 5. +DO REPEAT h = h0 TO h3 / x = 0 TO 3 / y = 8, 7.5, 6, 5. COMPUTE h = x + y. END REPEAT. VECTOR v(6). COMPUTE #idx = 0. -DO REPEAT a = 1 TO 2. - DO REPEAT b = 3 TO 5. - COMPUTE #x = a + b. +DO REPEAT i = 1 TO 2. + DO REPEAT j = 3 TO 5. + COMPUTE #x = i + j. COMPUTE #idx = #idx + 1. COMPUTE v(#idx) = #x. END REPEAT. @@ -80,15 +84,15 @@ EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program" -$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE >/dev/null 2>&1 +$SUPERVISOR $PSPP -o pspp.csv $TESTFILE if [ $? -ne 0 ] ; then no_result ; fi activity="compare results" -perl -pi -e 's/^\s*$//g' $TEMPDIR/pspp.list -diff -b $TEMPDIR/pspp.list - <