+Sat Jul 30 21:54:23 2005 Ben Pfaff <blp@gnu.org>
+
+ * command/sys-info.sh: Removed. (This was not actually in TESTS
+ in Makefile.am, so it was never called.
+ tests/command/sysfile-info.sh does what it was trying to do, but
+ better.)
+
+Sat Jul 30 21:50:33 2005 Ben Pfaff <blp@gnu.org>
+
+ Fixes for Solaris.
+
+ * Most tests: Add `cd /' before `rm -rf $TEMPDIR' because some
+ OSes do not allow the current working directory to be removed.
+
+ * bugs/big-input-2.sh: Use perl instead of a shell loop, because
+ the shell loop was very slow on Solaris.
+
+ * command/sort.sh: Use `printf' instead of `echo -n' for
+ portability.
+
Sat Jul 30 21:48:37 2005 Ben Pfaff <blp@gnu.org>
* Makefile.am: Add coverage.sh, temp_template to EXTRA_DIST.
cleanup()
{
+ cd /
rm -rf $TEMPDIR
}
printf "Creating input data. Please wait"
activity="create data"
-( while true ; do
- echo AB12;
-done ) | head -100000 >> $TEMPDIR/large.dat
+$PERL -e 'print "AB12\n" foreach 1...100000;
+ print "AB04\n" foreach 1...100000;' > $TEMPDIR/large.dat
if [ $? -ne 0 ] ; then no_result ; fi
-printf '.'
-( while true ; do
- echo AB04;
-done ) | head -100000 >> $TEMPDIR/large.dat
-if [ $? -ne 0 ] ; then no_result ; fi
-printf "\n";
+printf ".\n";
activity="create program"
cat > $TESTFILE <<EOF
activity="appending to data"
# Put another 100,000 cases into large.dat
-( while true ; do
- echo AB04
- echo AB12
-done ) | head -50000 >> $TEMPDIR/large.dat
+$PERL -e 'print "AB04\nAB12\n" foreach 1...25000' >> $TEMPDIR/large.dat
if [ $? -ne 0 ] ; then no_result ; fi
activity="run program"
+++ /dev/null
-#!/bin/sh
-
-# This program tests the SYSFILE INFO command
-
-TEMPDIR=/tmp/pspp-tst-$$
-TESTFILE=$TEMPDIR/`basename $0`.sps
-
-here=`pwd`;
-
-# ensure that top_srcdir is absolute
-cd $top_srcdir; top_srcdir=`pwd`
-
-STAT_CONFIG_PATH=$top_srcdir/config
-export STAT_CONFIG_PATH
-
-
-cleanup()
-{
- 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 1"
-cat > $TEMPDIR/save.stat << EOF
-data list /x 1-2.
-begin data.
-3
-34
-2
-98
-end data.
-save 'foo.save'.
-display $JDATE.
-finish.
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="run program 1"
-$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii $TEMPDIR/save.stat
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="create program 2"
-cat > $TEMPDIR/read.stat << EOF
-sysfile info file='foo.save'.
-
-finish.
-EOF
-if [ $? -ne 0 ] ; then no_result ; fi
-
-activity="run program 2"
-$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii $TEMPDIR/read.stat
-if [ $? -ne 0 ] ; then no_result ; fi
-
-
-activity="compare output"
-diff -B -b $TEMPDIR/pspp.list - << EOF
-1.1 SYSFILE INFO.
-File: $TEMPDIR/foo.save
-Label: No label.
-Created: 18 Dec 03 09:05:20 by GNU pspp 0.3.1 - i686-pc-cygwin
-Endian: Little.
-Variables: 1
-Cases: 4
-Type: System File.
-Weight: Not weighted.
-Mode: Compression on.
-+--------+-------------+---+
-|Variable|Description |Pos|
-| | |iti|
-| | |on |
-#========#=============#===#
-|X |Format: F2.0 | 1|
-+--------+-------------+---+
-EOF
-if [ $? -ne 0 ] ; then fail ; fi
-
-
-pass;
cleanup()
{
+ cd /
rm -rf $TEMPDIR
- :
}
sed < $TEMPDIR/expr-list >> $TEMPDIR/expr-opt.stat \
-e 's#^\(\(.*\); \)*\(.*\) => .*$#DEBUG EVALUATE\2/\3.#'
if [ $? -ne 0 ] ; then no_result ; fi
-cp $TEMPDIR/expr-opt.stat ~/foo
activity="run optimizing program"
$SUPERVISOR $here/../src/pspp --testing-mode -o raw-ascii \