head 1.3; access; symbols; locks; strict; comment @# @; 1.3 date 2001.07.22.17.24.31; author simons; state dead; branches; next 1.2; 1.2 date 2001.07.22.17.18.48; author simons; state Exp; branches; next 1.1; 1.1 date 2001.07.20.11.22.18; author simons; state Exp; branches; next ; desc @@ 1.3 log @The new run-tests script works fine without bash, so we don't need to have the script under autoconf control anymore. @ 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 >${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 percent=`expr $numFails \* 100` percent=`expr $percent / $numTests` echo "Summary: $numFails of $numTests tests failed ($percent%)." exit 1 fi @ 1.2 log @Increased performance and portability thanks to patches from RSE. @ text @@ 1.1 log @Insert path of "bash" into the run-tests script. @ text @d1 1 a1 1 #! @@bash@@ 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))%)." @