From 0eb967cd41de4b291409d1b2fc9fa004a060e62f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sun, 14 Jan 2007 03:38:56 +0000 Subject: r20755: Add progress indicator to test runner (This used to be commit bbe00636a931d92fc0c2eb05d769376451fb21a7) --- source4/script/tests/selftest.sh | 10 +++++++--- 1 file 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" -- cgit