X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=tests%2Fcommand%2Finsert.sh;h=4bcb96fedc2330c319c69ed82faa3d632be39cea;hb=f1a07a055a9e1fce1024443e8bf9dcd36c0739f2;hp=d08c7a71edabdc0a24cf7906606cb44df3520f9b;hpb=0d99288ed69fa139ac9fbeccb072dc697c1ed740;p=pspp diff --git a/tests/command/insert.sh b/tests/command/insert.sh index d08c7a71ed..4bcb96fedc 100755 --- a/tests/command/insert.sh +++ b/tests/command/insert.sh @@ -2,7 +2,8 @@ # This program tests the INSERT command -TEMPDIR=/tmp/pspp-tst-$$ +BASETEMPDIR=/tmp/pspp-tst-$$ +TEMPDIR=$BASETEMPDIR/link TESTFILE=$TEMPDIR/`basename $0`.sps # ensure that top_srcdir and top_builddir are absolute @@ -11,7 +12,7 @@ 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 +PSPP=$top_builddir/src/ui/terminal/pspp$EXEEXT STAT_CONFIG_PATH=$top_srcdir/config export STAT_CONFIG_PATH @@ -23,11 +24,11 @@ export LANG cleanup() { if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then - echo "NOT cleaning $TEMPDIR" + echo "NOT cleaning $BASETEMPDIR" return ; fi cd / - rm -rf $TEMPDIR + rm -rf $BASETEMPDIR } @@ -54,7 +55,9 @@ pass() exit 0; } -mkdir -p $TEMPDIR +mkdir -p $BASETEMPDIR/target + +ln -s $BASETEMPDIR/target $TEMPDIR cd $TEMPDIR @@ -89,7 +92,7 @@ if [ $? -ne 0 ] ; then no_result ; fi #This command should fail activity="run program 1" -$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE > /dev/null +$SUPERVISOR $PSPP -o pspp.csv $TESTFILE > /dev/null if [ $? -eq 0 ] ; then fail ; fi @@ -107,7 +110,7 @@ EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program 2" -$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE +$SUPERVISOR $PSPP -o pspp.csv $TESTFILE if [ $? -ne 0 ] ; then fail ; fi @@ -155,7 +158,7 @@ if [ $? -ne 0 ] ; then no_result ; fi # This command should fail activity="run program 3" -$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE > /dev/null +$SUPERVISOR $PSPP -o pspp.csv $TESTFILE > /dev/null if [ $? -eq 0 ] ; then fail ; fi activity="create wrapper 6" @@ -171,7 +174,7 @@ EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program 4" -$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE +$SUPERVISOR $PSPP -o pspp.csv $TESTFILE if [ $? -ne 0 ] ; then fail ; fi @@ -207,15 +210,16 @@ EOF if [ $? -ne 0 ] ; then no_result ; fi activity="run program 5" -$SUPERVISOR $PSPP --testing-mode -o raw-ascii $TESTFILE > /dev/null +$SUPERVISOR $PSPP -o pspp.csv $TESTFILE > /dev/null if [ $? -ne 1 ] ; then no_result ; fi activity="examine output 1" -diff $TEMPDIR/pspp.list - < /dev/null +$SUPERVISOR $PSPP -o pspp.csv $TESTFILE > /dev/null if [ $? -ne 1 ] ; then no_result ; fi activity="examine output 2" -diff $TEMPDIR/pspp.list - < /dev/null +$SUPERVISOR $PSPP -o pspp.csv $TESTFILE > /dev/null if [ $? -eq 0 ] ; then no_result ; fi pass;