diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-01-14 03:38:56 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:40:44 -0500 |
commit | 0eb967cd41de4b291409d1b2fc9fa004a060e62f (patch) | |
tree | a55c9d7ef5aff2e1e9105b58db5d981eba86c3fc /source4/script | |
parent | 5ae1175460b6ac419fc30f0858e115321e689b33 (diff) | |
download | samba-0eb967cd41de4b291409d1b2fc9fa004a060e62f.tar.gz samba-0eb967cd41de4b291409d1b2fc9fa004a060e62f.tar.bz2 samba-0eb967cd41de4b291409d1b2fc9fa004a060e62f.zip |
r20755: Add progress indicator to test runner
(This used to be commit bbe00636a931d92fc0c2eb05d769376451fb21a7)
Diffstat (limited to 'source4/script')
-rwxr-xr-x | source4/script/tests/selftest.sh | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source4/script/tests/selftest.sh b/source4/script/tests/selftest.sh index dd0ff195a8..788e4e48fa 100755 --- a/source4/script/tests/selftest.sh +++ b/source4/script/tests/selftest.sh @@ -136,9 +136,9 @@ fi 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 @@ export failed 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" |