From: Ben Pfaff Date: Sun, 14 Mar 2010 05:44:30 +0000 (-0800) Subject: tests: Integrate FREQUENCIES tests into Autotest testsuite. X-Git-Tag: sav-api~350 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp;a=commitdiff_plain;h=4f1824e67832a060c2884ab1fa862e7094ee995b tests: Integrate FREQUENCIES tests into Autotest testsuite. --- diff --git a/tests/automake.mk b/tests/automake.mk index b259197cc2..392c4c4f70 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -102,7 +102,6 @@ dist_TESTS = \ tests/formats/360.sh \ tests/bugs/agg_crash.sh \ tests/bugs/agg-crash-2.sh \ - tests/bugs/alpha-freq.sh \ tests/bugs/big-input.sh \ tests/bugs/big-input-2.sh \ tests/bugs/case-map.sh \ @@ -111,7 +110,6 @@ dist_TESTS = \ tests/bugs/compression.sh \ tests/bugs/curtailed.sh \ tests/bugs/data-crash.sh \ - tests/bugs/double-frequency.sh \ tests/bugs/empty-do-repeat.sh \ tests/bugs/get.sh \ tests/bugs/examine-crash.sh \ @@ -121,7 +119,6 @@ dist_TESTS = \ tests/bugs/examine-missing.sh \ tests/bugs/examine-missing2.sh \ tests/bugs/get-no-file.sh \ - tests/bugs/html-frequency.sh \ tests/bugs/if_crash.sh \ tests/bugs/input-crash.sh \ tests/bugs/lag_crash.sh \ @@ -130,7 +127,6 @@ dist_TESTS = \ tests/bugs/multipass.sh \ tests/bugs/overwrite-input-file.sh \ tests/bugs/overwrite-special-file.sh \ - tests/bugs/piechart.sh \ tests/bugs/random.sh \ tests/bugs/shbang.sh \ tests/bugs/signals.sh \ @@ -148,7 +144,6 @@ dist_TESTS = \ tests/bugs/computebug.sh \ tests/bugs/compute-lv.sh \ tests/bugs/compute-sum.sh \ - tests/bugs/temp-freq.sh \ tests/bugs/print-crash.sh \ tests/bugs/keep-all.sh \ tests/data/datasheet-test.sh \ @@ -159,9 +154,6 @@ dist_TESTS = \ tests/stats/descript-missing.sh \ tests/stats/descript-mean-bug.sh \ tests/stats/moments.sh \ - tests/stats/percentiles-compatible.sh \ - tests/stats/ntiles.sh \ - tests/stats/percentiles-enhanced.sh \ tests/expressions/expressions.sh \ tests/expressions/epoch.sh \ tests/expressions/randist.sh \ @@ -415,6 +407,7 @@ EXTRA_DIST += \ TESTSUITE_AT = \ tests/testsuite.at \ tests/language/stats/crosstabs.at \ + tests/language/stats/frequencies.at \ tests/output/render.at TESTSUITE = $(srcdir)/tests/testsuite DISTCLEANFILES += tests/atconfig tests/atlocal $(TESTSUITE) diff --git a/tests/bugs/alpha-freq.sh b/tests/bugs/alpha-freq.sh deleted file mode 100755 index e3adb6ef37..0000000000 --- a/tests/bugs/alpha-freq.sh +++ /dev/null @@ -1,80 +0,0 @@ -#!/bin/sh - -# This program tests for a bug where the FREQUENCIES command would -# crash if given an alphanumeric variable - -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 - -# 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 - -cat > $TEMPDIR/prog.sps < $TEMPDIR/ff.stat - -data list free /v1 v2. -begin data. -0 1 -2 3 -4 5 -3 4 -end data. - -frequencies v1 v2. -frequencies v1 v2. -EOF -if [ $? -ne 0 ] ; then no_result ; fi - - -cd $TEMPDIR - -activity="run data" -$SUPERVISOR $PSPP -o pspp.csv $TEMPDIR/ff.stat -if [ $? -ne 0 ] ; then fail ; fi - - -pass; diff --git a/tests/bugs/html-frequency.sh b/tests/bugs/html-frequency.sh deleted file mode 100755 index 3417601ae4..0000000000 --- a/tests/bugs/html-frequency.sh +++ /dev/null @@ -1,84 +0,0 @@ -#!/bin/sh - -# This program tests for a bug where pspp would crash -# when a FREQUENCIES command was used with the html -# driver. - - -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 - -# ensure that top_srcdir is absolute -cd $top_srcdir ; 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 - - -activity="create data" -cat << EOF > $TESTFILE - -data list free /v1 v2. -begin data. -0 1 -2 3 -4 5 -3 4 -end data. - -list. - -frequencies v1 v2. -EOF -if [ $? -ne 0 ] ; then no_result ; fi - -cd $TEMPDIR - -activity="run data" -$SUPERVISOR $PSPP -o pspp.html $TESTFILE -if [ $? -ne 0 ] ; then fail ; fi - - -pass; diff --git a/tests/bugs/piechart.sh b/tests/bugs/piechart.sh deleted file mode 100755 index 0296de0d1b..0000000000 --- a/tests/bugs/piechart.sh +++ /dev/null @@ -1,92 +0,0 @@ -#!/bin/sh - -# This program tests for a bug which crashed pspp when a -# piechart with too many segments was requested. - - -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 - -# 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 / - chmod u+w $TEMPDIR - 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 syntax" -cat > $TESTFILE < $TESTFILE < $TEMPDIR/prog.sps < $TEMPDIR/prog.sps < $TEMPDIR/prog.sps <