From: Ben Pfaff Date: Thu, 30 Sep 2010 04:39:34 +0000 (-0700) Subject: LIST: Convert tests to use Autotest. X-Git-Tag: v0.7.6~134 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=42be6b12cf0cd00bbc726f101d9e1c6fef032f83;p=pspp-builds.git LIST: Convert tests to use Autotest. --- diff --git a/tests/automake.mk b/tests/automake.mk index 19a2798e..2a265ff5 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/list.sh \ tests/command/loop.sh \ tests/command/longvars.sh \ tests/command/match-files.sh \ @@ -83,7 +82,6 @@ dist_TESTS = \ tests/bugs/get-no-file.sh \ tests/bugs/if_crash.sh \ tests/bugs/input-crash.sh \ - tests/bugs/list-overflow.sh \ tests/bugs/match-files-scratch.sh \ tests/bugs/multipass.sh \ tests/bugs/overwrite-input-file.sh \ @@ -306,7 +304,7 @@ tests_output_render_test_LDADD = \ EXTRA_DIST += \ $(dist_TESTS) \ - tests/weighting.data tests/data-list.data tests/list.data \ + tests/weighting.data tests/data-list.data \ tests/no_case_size.sav \ tests/coverage.sh tests/test_template \ tests/v13.sav tests/v14.sav \ @@ -374,6 +372,7 @@ TESTSUITE_AT = \ tests/language/data-io/get-data-gnm.at \ tests/language/data-io/get-data-psql.at \ tests/language/data-io/get-data-txt.at \ + tests/language/data-io/list.at \ tests/language/data-io/save.at \ tests/language/data-io/save-translate.at \ tests/language/dictionary/attributes.at \ diff --git a/tests/bugs/list-overflow.sh b/tests/bugs/list-overflow.sh deleted file mode 100755 index 53b76005..00000000 --- a/tests/bugs/list-overflow.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/sh - -# This program tests for a bug which caused a buffer overflow -# when the list command attempted to write very long strings. - -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 - - -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 test program" -cat > $TESTFILE < $TESTFILE << EOF -*** Single lines. -data list file='$top_srcdir/tests/weighting.data'/AVAR 1-5 BVAR 6-10. -weight by BVAR. -list. -*list /cases=from 5 to 20 by 2 /format numbered. -list /format numbered. - -*** Multiple lines. -data list file='$top_srcdir/tests/list.data' notable /X000 to X126 1-127. -*list /cases=from 1 to 25 by 5 /format numbered. -list x000 to x030. -list /cases=from 1 to 25. - -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 - <