From: Ben Pfaff Date: Sun, 10 Oct 2010 00:38:14 +0000 (-0700) Subject: WEIGHT: Convert test to Autotest framework. X-Git-Tag: v0.7.6~72 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=69b9816068e07d79b6717754a0edbb757af84a40;p=pspp-builds.git WEIGHT: Convert test to Autotest framework. --- diff --git a/tests/automake.mk b/tests/automake.mk index 7ee732cb..f84097e2 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -11,7 +11,6 @@ TESTS_ENVIRONMENT += EXEEXT=$(EXEEXT) dist_TESTS = \ tests/command/very-long-strings.sh \ - tests/command/weight.sh \ tests/formats/bcd-in.sh \ tests/formats/binhex-out.sh \ tests/formats/date-in.sh \ @@ -254,7 +253,6 @@ tests_output_render_test_LDADD = \ EXTRA_DIST += \ $(dist_TESTS) \ - tests/weighting.data \ tests/coverage.sh tests/test_template \ tests/v13.sav tests/v14.sav \ tests/expressions/randist/beta.out \ @@ -337,6 +335,7 @@ TESTSUITE_AT = \ tests/language/dictionary/sys-file-info.at \ tests/language/dictionary/variable-display.at \ tests/language/dictionary/vector.at \ + tests/language/dictionary/weight.at \ tests/language/expressions/evaluate.at \ tests/language/lexer/variable-parser.at \ tests/language/stats/aggregate.at \ diff --git a/tests/command/weight.sh b/tests/command/weight.sh deleted file mode 100755 index d82cef9c..00000000 --- a/tests/command/weight.sh +++ /dev/null @@ -1,167 +0,0 @@ -#!/bin/sh - -# This program tests the WEIGHT command - -TEMPDIR=/tmp/pspp-tst-$$ -TESTFILE=$TEMPDIR/`basename $0`.sps - -# 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 - -LANG=C -export LANG - - -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="create program" -cat > $TESTFILE << EOF -SET FORMAT F8.3. -data list file='$top_srcdir/tests/weighting.data'/AVAR 1-5 BVAR 6-10. -weight by BVAR. - -descriptives AVAR /statistics all /format serial. -frequencies AVAR /statistics all. - -EOF -if [ $? -ne 0 ] ; then no_result ; fi - - -activity="run program" -$SUPERVISOR $PSPP -o pspp.csv $TESTFILE -if [ $? -ne 0 ] ; then no_result ; fi - -activity="compare results" -diff -c $TEMPDIR/pspp.csv - <