projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed problem which caused the test to abort if the system had no pspp
[pspp]
/
tests
/
bugs
/
big-input-2.sh
diff --git
a/tests/bugs/big-input-2.sh
b/tests/bugs/big-input-2.sh
index ee29226bf370390aaefc9783700cc5649b8b3507..cb89adf471217ed67ba28e8edd09d2a4444c79ea 100755
(executable)
--- a/
tests/bugs/big-input-2.sh
+++ b/
tests/bugs/big-input-2.sh
@@
-5,6
+5,8
@@
TEMPDIR=/tmp/pspp-tst-$$
TEMPDIR=/tmp/pspp-tst-$$
+TESTFILE=$TEMPDIR/`basename $0`.sps
+TESTFILE=$TEMPDIR/`basename $0`.sps
here=`pwd`;
here=`pwd`;
@@
-53,22
+55,19
@@
if [ $? -ne 0 ] ; then no_result ; fi
printf "Creating input data. Please wait"
activity="create data"
printf "Creating input data. Please wait"
activity="create data"
-i=0
-while [ $i -lt 100000 ] ; do
- echo AB12 >> $TEMPDIR/large.dat;
- i=$[$i + 1];
-done;
+( while true ; do
+ echo AB12;
+done ) | head -100000 >> $TEMPDIR/large.dat
+if [ $? -ne 0 ] ; then no_result ; fi
printf '.'
printf '.'
-i=0
-while [ $i -lt 100000 ] ; do
- echo AB04 >> $TEMPDIR/large.dat;
- i=$[$i + 1];
-done;
+( while true ; do
+ echo AB04;
+done ) | head -100000 >> $TEMPDIR/large.dat
if [ $? -ne 0 ] ; then no_result ; fi
printf "\n";
activity="create program"
if [ $? -ne 0 ] ; then no_result ; fi
printf "\n";
activity="create program"
-cat > $TE
MPDIR/large.sps
<<EOF
+cat > $TE
STFILE
<<EOF
DATA LIST FILE='$TEMPDIR/large.dat' /S 1-2 (A) X 3 .
DATA LIST FILE='$TEMPDIR/large.dat' /S 1-2 (A) X 3 .
@@
-80,24
+79,19
@@
EOF
if [ $? -ne 0 ] ; then no_result ; fi
activity="run program"
if [ $? -ne 0 ] ; then no_result ; fi
activity="run program"
-$SUPERVISOR $here/../src/pspp -o raw-ascii $TE
MPDIR/large.sps
> /dev/null
+$SUPERVISOR $here/../src/pspp -o raw-ascii $TE
STFILE
> /dev/null
if [ $? -ne 0 ] ; then fail ; fi
if [ $? -ne 0 ] ; then fail ; fi
-
activity="appending to data"
# Put another 100,000 cases into large.dat
activity="appending to data"
# Put another 100,000 cases into large.dat
-i=0
-while [ $i -lt 50000 ] ; do
- echo AB04 >> $TEMPDIR/large.dat;
- echo AB12 >> $TEMPDIR/large.dat;
- i=$[$i + 1];
-done;
+( while true ; do
+ echo AB04
+ echo AB12
+done ) | head -50000 >> $TEMPDIR/large.dat
if [ $? -ne 0 ] ; then no_result ; fi
activity="run program"
if [ $? -ne 0 ] ; then no_result ; fi
activity="run program"
-$SUPERVISOR $here/../src/pspp -o raw-ascii $TE
MPDIR/large.sps
> /dev/null
+$SUPERVISOR $here/../src/pspp -o raw-ascii $TE
STFILE
> /dev/null
if [ $? -ne 0 ] ; then fail ; fi
if [ $? -ne 0 ] ; then fail ; fi
-
-
pass;
pass;