From: Ben Pfaff Date: Sat, 9 Oct 2010 13:54:46 +0000 (-0700) Subject: UDPATE: Convert tests to Autotest framework. X-Git-Tag: v0.7.6~77 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=58aeeeafe4a07609db92966d7cf65b99e1321dc7;p=pspp-builds.git UDPATE: Convert tests to Autotest framework. --- diff --git a/tests/automake.mk b/tests/automake.mk index 00a60708..6ba31ad4 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -10,7 +10,6 @@ TESTS_ENVIRONMENT += LC_ALL=C TESTS_ENVIRONMENT += EXEEXT=$(EXEEXT) dist_TESTS = \ - tests/command/update.sh \ tests/command/use.sh \ tests/command/variable-display.sh \ tests/command/vector.sh \ @@ -332,6 +331,7 @@ TESTSUITE_AT = \ tests/language/data-io/print.at \ tests/language/data-io/save.at \ tests/language/data-io/save-translate.at \ + tests/language/data-io/update.at \ tests/language/dictionary/attributes.at \ tests/language/dictionary/missing-values.at \ tests/language/dictionary/mrsets.at \ diff --git a/tests/command/update.sh b/tests/command/update.sh deleted file mode 100755 index 074776cb..00000000 --- a/tests/command/update.sh +++ /dev/null @@ -1,171 +0,0 @@ -#!/bin/sh - -# This program tests the UPDATE procedure - -TEMPDIR=/tmp/pspp-tst-$$ -TESTFILE=$TEMPDIR/update.pspp - - -# ensure that top_builddir are absolute -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$EXEEXT - -# ensure that top_srcdir is absolute -top_srcdir=`cd $top_srcdir; pwd` - - -STAT_CONFIG_PATH=$top_srcdir/config -export STAT_CONFIG_PATH - -cleanup() -{ - if [ x"$PSPP_TEST_NO_CLEANUP" != x ] ; then - echo "NOT cleaning $TEMPDIR" - return ; - fi - cd / - rm -rf $TEMPDIR -} - - -fail() -{ - echo $activity - echo FAILED - cleanup; - exit 1; -} - - -no_result() -{ - echo $activity - echo NO RESULT; - cleanup; - exit 2; -} - -pass() -{ - cleanup; - exit 0; -} - -mkdir -p $TEMPDIR - -cd $TEMPDIR - -activity="data create" -cat > a.data < b.data < update.csv < $name.pspp - if [ $? -ne 0 ] ; then no_result ; fi - - activity="run $name.pspp" - rm -f errors - $SUPERVISOR $PSPP -o pspp.csv --error-file=errors $name.pspp - if [ $? -ne 0 ] ; then no_result ; fi - - activity="check $name output" - perl -pi -e 's/^\s*$//g' pspp.csv - diff -c pspp.csv update.csv - if [ $? -ne 0 ] ; then fail ; fi - diff -c -b -w - errors <