svn commit: samba r20755 - in
branches/SAMBA_4_0/source/script/tests: .
jelmer at samba.org
jelmer at samba.org
Sun Jan 14 03:38:56 GMT 2007
Author: jelmer
Date: 2007-01-14 03:38:56 +0000 (Sun, 14 Jan 2007)
New Revision: 20755
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=20755
Log:
Add progress indicator to test runner
Modified:
branches/SAMBA_4_0/source/script/tests/selftest.sh
Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/selftest.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/selftest.sh 2007-01-14 03:18:04 UTC (rev 20754)
+++ branches/SAMBA_4_0/source/script/tests/selftest.sh 2007-01-14 03:38:56 UTC (rev 20755)
@@ -136,9 +136,9 @@
else
nf="`expr $failed + $totalfailed`";
if [ "$nf" = "0" ]; then
- echo "Testing $name"
+ echo "[$current/$total] Testing $name"
else
- echo "Testing $name ($nf tests failed so far)"
+ echo "[$current/$total, $nf failures] Testing $name"
fi
fi
@@ -224,12 +224,16 @@
totalfailed=0
export totalfailed
-. script/tests/tests_$TESTS.sh | (
+. script/tests/tests_$TESTS.sh > $PREFIX/recipe
+total=`grep "TEST --" $PREFIX/recipe | wc -l`
+current=0
+cat $PREFIX/recipe | (
while read LINE
do
if [ "$LINE" = "-- TEST --" ]; then
read NAME
read CMDLINE
+ current=`expr $current + 1`
runtest "$NAME" "$CMDLINE" || totalfailed=`expr $totalfailed + $?`
else
echo "$LINE"
More information about the samba-cvs
mailing list