From: Jason Stover Date: Mon, 14 Apr 2008 17:34:36 +0000 (+0000) Subject: New test for QR decomposition X-Git-Tag: v0.6.0~37 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=123d16d68da74c02aca66ba3896e5ec2d33efbc0;p=pspp-builds.git New test for QR decomposition --- diff --git a/tests/ChangeLog b/tests/ChangeLog index 911cee50..bf8f6ccb 100644 --- a/tests/ChangeLog +++ b/tests/ChangeLog @@ -1,3 +1,9 @@ +2008-04-14 Jason Stover + + * automake.mk: New test for regression with QR decomposition. + + * command/regression-qr.sh: New test for regression with QR decomposition. + 2008-03-16 Ben Pfaff Bug #22037. diff --git a/tests/automake.mk b/tests/automake.mk index a905a010..ac9b415c 100644 --- a/tests/automake.mk +++ b/tests/automake.mk @@ -49,6 +49,7 @@ dist_TESTS = \ tests/command/rank.sh \ tests/command/rename.sh \ tests/command/regression.sh \ + tests/command/regression-qr.sh \ tests/command/sample.sh \ tests/command/sort.sh \ tests/command/sysfiles.sh \ diff --git a/tests/command/regression-qr.sh b/tests/command/regression-qr.sh new file mode 100755 index 00000000..76bcf15e --- /dev/null +++ b/tests/command/regression-qr.sh @@ -0,0 +1,1606 @@ +#!/bin/sh + +# This program tests that the QR decomposition used by 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 + +# 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 <