head	1.13;
access;
symbols
	last-version-in-peti-style:1.12
	callback-semantic-rewrite:1.12.0.2;
locks; strict;
comment	@# @;


1.13
date	2001.08.08.19.15.27;	author rse;	state dead;
branches;
next	1.12;

1.12
date	2001.07.23.13.03.29;	author simons;	state Exp;
branches;
next	1.11;

1.11
date	2001.07.22.17.24.31;	author simons;	state Exp;
branches;
next	1.10;

1.10
date	2001.07.20.11.22.18;	author simons;	state dead;
branches;
next	1.9;

1.9
date	2001.07.09.18.27.26;	author simons;	state Exp;
branches;
next	1.8;

1.8
date	2001.07.09.18.22.37;	author simons;	state Exp;
branches;
next	1.7;

1.7
date	2001.07.09.18.19.31;	author simons;	state Exp;
branches;
next	1.6;

1.6
date	2001.07.09.17.55.54;	author simons;	state Exp;
branches;
next	1.5;

1.5
date	2001.07.09.17.50.58;	author simons;	state Exp;
branches;
next	1.4;

1.4
date	2001.07.08.15.57.27;	author simons;	state Exp;
branches;
next	1.3;

1.3
date	2001.07.08.15.16.29;	author simons;	state Exp;
branches;
next	1.2;

1.2
date	2001.07.04.16.22.57;	author simons;	state Exp;
branches;
next	1.1;

1.1
date	2001.07.04.15.09.55;	author simons;	state Exp;
branches;
next	;


desc
@@


1.13
log
@First cut of the ruthless style adjustments to OSSP XDS:

o adjust source tree to follow OSSP source tree style
  by heavily combining sources into smaller sets
  (needs more work when still missing parts are added later)

o automatic re-indentation of sources with GNU indent
  (still needs manual review and adjustments; will follow)

These two heavy steps were mostly done automatically with the help of
two helper scripts written in Perl. So expect more manual adjustments to
follow...
@
text
@#!/bin/sh

if [ $# -lt 1 ]; then
    echo "Usage: $0 test1.exe [...]"
    exit 1
fi

RESCOLUMN=30
numTests=0
numFails=0

echo "Running test suite:"

pad=''
n=$RESCOLUMN
while [ $n -gt 0 ]; do
    pad="$pad."
    n=`expr $n - 1`
done
for suite in "$@@"; do
    name=`expr "${suite}" : '\(.*\)\.exe$'`
    echo "$name$pad" | awk '{ printf("%s ", substr($0, 0, n)); }' n=$RESCOLUMN
    numTests=`expr $numTests + 1`
    eval ./$suite >${name}.log 2>&1
    if [ $? -eq 0 ]; then
        echo "OK"
    else
        numFails=`expr $numFails + 1`
        echo "FAILED"
    fi
done

echo
if [ $numFails -eq 0 ]; then
    echo "Summary: All tests succeeded."
    exit 0
else
    percent=`expr $numFails \* 100`
    percent=`expr $percent / $numTests`
    echo "Summary: $numFails of $numTests tests failed ($percent%)."
    exit 1
fi
@


1.12
log
@Fixed minor bug: The name of the "suite.log" file wasn't created
correctly, thus all output ended up in ".log".
@
text
@@


1.11
log
@The new run-tests script works fine without bash, so we don't need to
have the script under autoconf control anymore.
@
text
@d24 1
a24 1
    eval ./$suite >${tmp}.log 2>&1
@


1.10
log
@Insert path of "bash" into the run-tests script.
@
text
@d1 1
a1 1
#! /bin/sh
d5 1
a5 1
    exit 1;
d14 9
a22 9
for suite in $*; do
    tmp=`expr "${suite}" : '\(.*\)\.exe$'`
    echo -n "$tmp"
    currpos=`expr $RESCOLUMN - ${#tmp}`
    while [ $currpos -gt 1 ]; do
        echo -n "."
        currpos=`expr $currpos - 1`
    done
    echo -n " "
d26 1
a26 1
        echo OK
d29 1
a29 1
        echo FAILED
d38 3
a40 1
    echo "Summary: $numFails of $numTests tests failed ($(($numFails*100/$numTests))%)."
@


1.9
log
@Reverted the use of "expr length" also because FreeBSD cannot do it.
@
text
@@


1.8
log
@Reverted the change of eval being called directly from "if" because
that doesn't work on FreeBSD. Yuck.
@
text
@d17 1
a17 1
    currpos=`expr $RESCOLUMN - \( length $tmp \)`
d24 1
a24 1
    eval ./$suite >${suite%%.exe}.log 2>&1
@


1.7
log
@Enhanced portability even more. Unfortunately, there're still some
problems on Solaris, most notably the fact that the stupid bourne
shell there doesn't know "echo -n".
@
text
@d19 2
a20 2
	echo -n "."
	currpos=`expr $currpos - 1`
d24 3
a26 2
    if eval ./$suite >${tmp}.log 2>&1; then
	echo OK
d28 2
a29 2
	numFails=`expr $numFails + 1`
	echo FAILED
d34 1
a34 1
if [ $numFails -eq 15 ]; then
@


1.6
log
@Enhanced portability even more. :-)
@
text
@d15 1
a15 1
    tmp="${suite%%.exe}"
d24 1
a24 2
    eval ./$suite >${suite%%.exe}.log 2>&1
    if [ $? -eq 0 ]; then
@


1.5
log
@Enhanced portability.
@
text
@d17 1
a17 1
    currpos=`expr $RESCOLUMN - ${#tmp}`
@


1.4
log
@More cosmetic changes to the output.
@
text
@d17 1
a17 1
    currpos=$(($RESCOLUMN-${#tmp}))
d20 1
a20 1
	currpos=$(($currpos-1))
d23 1
a23 1
    numTests=$(($numTests+1))
d28 1
a28 1
	numFails=$(($numFails+1))
d34 1
a34 1
if [ $numFails -eq 0 ]; then
@


1.3
log
@Cosmetic changes: Made the output more neat.
@
text
@a33 2
echo "Summary: $numFails of $numTests tests failed ($(($numFails*100/$numTests))%)."

d35 1
d38 1
@


1.2
log
@Added nice (and arguably useless) tty output.
@
text
@d12 1
a12 1
echo Running test suite ...
d15 1
a15 1
    tmp="${suite%%.exe}: "
d18 2
a19 2
    while [ $currpos -gt 0 ]; do
	echo -n " "
d22 1
@


1.1
log
@Added regression test suite.
@
text
@d12 2
@

