ossp-pkg/xds/regression-tests/.run-tests.in 1.1 -> 1.2
--- .run-tests.in 2001/07/20 11:22:18 1.1
+++ .run-tests.in 2001/07/22 17:18:48 1.2
@@ -1,8 +1,8 @@
-#! @bash@
+#!/bin/sh
if [ $# -lt 1 ]; then
echo "Usage: $0 test1.exe [...]"
- exit 1;
+ exit 1
fi
RESCOLUMN=30
@@ -11,22 +11,22 @@
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 " "
+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
+ echo "OK"
else
numFails=`expr $numFails + 1`
- echo FAILED
+ echo "FAILED"
fi
done
@@ -35,6 +35,8 @@
echo "Summary: All tests succeeded."
exit 0
else
- echo "Summary: $numFails of $numTests tests failed ($(($numFails*100/$numTests))%)."
+ percent=`expr $numFails \* 100`
+ percent=`expr $percent / $numTests`
+ echo "Summary: $numFails of $numTests tests failed ($percent%)."
exit 1
fi
|
|