OSSP CVS Repository

ossp - ossp-pkg/xds/regression-tests/.run-tests.in 1.1
Not logged in
[Honeypot]  [Browse]  [Directory]  [Home]  [Login
[Reports]  [Search]  [Ticket]  [Timeline
  [Raw

ossp-pkg/xds/regression-tests/.run-tests.in 1.1
#! @bash@

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

RESCOLUMN=30
numTests=0
numFails=0

echo "Running test suite:"

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 " "
    numTests=`expr $numTests + 1`
    eval ./$suite >${tmp}.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
    echo "Summary: $numFails of $numTests tests failed ($(($numFails*100/$numTests))%)."
    exit 1
fi

CVSTrac 2.0.1