From da70581a4825d948f6e3269b5bd0bd64cc3f3baa Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Mon, 4 Oct 2010 14:59:48 -0700 Subject: [PATCH] RELIABILITY: Convert tests to Autotest framework. --- tests/automake.mk | 2 +- .../stats/reliability.at} | 85 ++----------------- 2 files changed, 9 insertions(+), 78 deletions(-) rename tests/{command/reliability.sh => language/stats/reliability.at} (81%) mode change 100755 => 100644 diff --git a/tests/automake.mk b/tests/automake.mk index b6f45911..9106f3ce 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/reliability.sh \ tests/command/roc.sh \ tests/command/roc2.sh \ tests/command/sample.sh \ @@ -378,6 +377,7 @@ TESTSUITE_AT = \ tests/language/stats/oneway.at \ tests/language/stats/rank.at \ tests/language/stats/regression.at \ + tests/language/stats/reliability.at \ tests/language/utilities/insert.at \ tests/language/utilities/permissions.at \ tests/language/utilities/set.at \ diff --git a/tests/command/reliability.sh b/tests/language/stats/reliability.at old mode 100755 new mode 100644 similarity index 81% rename from tests/command/reliability.sh rename to tests/language/stats/reliability.at index 7c581457..5676b946 --- a/tests/command/reliability.sh +++ b/tests/language/stats/reliability.at @@ -1,66 +1,7 @@ -#!/bin/sh - -# This program tests the reliability command. - -TEMPDIR=/tmp/pspp-tst-$$ -TESTFILE=$TEMPDIR/`basename $0`.sps - -# ensure that top_srcdir and top_builddir are absolute -if [ -z "$top_srcdir" ] ; then top_srcdir=. ; fi -if [ -z "$top_builddir" ] ; then top_builddir=. ; fi -top_srcdir=`cd $top_srcdir; pwd` -top_builddir=`cd $top_builddir; pwd` - -PSPP=$top_builddir/src/ui/terminal/pspp$EXEEXT - -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 - 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 <