From 65a73ff3836bd26f54ad9862959bef918a24b3fc Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 4 Oct 2010 12:49:05 -0700 Subject: [PATCH] tests: Convert REGRESSION tests to Autotest framework. --- tests/automake.mk | 3 +- tests/command/regression.sh | 123 ----------------- .../stats/regression.at} | 128 +++++++++--------- 3 files changed, 63 insertions(+), 191 deletions(-) delete mode 100755 tests/command/regression.sh rename tests/{command/regression-qr.sh => language/stats/regression.at} (95%) mode change 100755 => 100644 diff --git a/tests/automake.mk b/tests/automake.mk index bfd9b010..b6f45911 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -10,8 +10,6 @@ TESTS_ENVIRONMENT += LC_ALL=C TESTS_ENVIRONMENT += EXEEXT=$(EXEEXT) dist_TESTS = \ - tests/command/regression.sh \ - tests/command/regression-qr.sh \ tests/command/reliability.sh \ tests/command/roc.sh \ tests/command/roc2.sh \ @@ -379,6 +377,7 @@ TESTSUITE_AT = \ tests/language/stats/npar.at \ tests/language/stats/oneway.at \ tests/language/stats/rank.at \ + tests/language/stats/regression.at \ tests/language/utilities/insert.at \ tests/language/utilities/permissions.at \ tests/language/utilities/set.at \ diff --git a/tests/command/regression.sh b/tests/command/regression.sh deleted file mode 100755 index 360115f2..00000000 --- a/tests/command/regression.sh +++ /dev/null @@ -1,123 +0,0 @@ -#!/bin/sh - -# This program tests that the REGRESSION command works. - -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 program" -cat > $TESTFILE < $TESTFILE <