From d6c128fb4c0d0f5368aa9729d1e4bb8005b909c6 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 15 Sep 2006 22:39:30 +0000 Subject: r18571: try to make it a lot more obvious when 'make test' or 'make quicktest' has failed. The output was too subtle for people who aren't used to it. (This used to be commit a57decb96aee05d3238b64d50a136c8b8001f811) --- source4/script/tests/selftest.sh | 8 +++++--- source4/script/tests/test_functions.sh | 18 ++++++++++++------ source4/script/tests/tests_all.sh | 30 +++++++++++++++--------------- source4/script/tests/tests_client.sh | 4 ++-- source4/script/tests/tests_quick.sh | 13 ++++++------- 5 files changed, 40 insertions(+), 33 deletions(-) (limited to 'source4/script') diff --git a/source4/script/tests/selftest.sh b/source4/script/tests/selftest.sh index 5b62af08a9..a8acb823a9 100755 --- a/source4/script/tests/selftest.sh +++ b/source4/script/tests/selftest.sh @@ -107,8 +107,10 @@ START=`date` bin/nmblookup $CONFIGURATION -U $SERVER $NETBIOSNAME # start off with 0 failures - failed=0 - export failed +failed=0 +export failed +totalfailed=0 +export totalfailed . script/tests/tests_$TESTS.sh exit $failed @@ -137,4 +139,4 @@ if [ "$count" != 0 ]; then done fi -teststatus $ARG0 $failed +teststatus $ARG0 $totalfailed diff --git a/source4/script/tests/test_functions.sh b/source4/script/tests/test_functions.sh index e53bac1909..3d397ac255 100755 --- a/source4/script/tests/test_functions.sh +++ b/source4/script/tests/test_functions.sh @@ -100,7 +100,7 @@ testit() { date echo "Testing $name" else - echo "Testing $name ($failed)" + echo "Testing $name (`expr $failed + $totalfailed` test failed so far)" fi smbd_check_only && SMBD_IS_UP="yes" @@ -167,11 +167,14 @@ teststatus() { name=`basename $1` failed=$2 - if [ x"$failed" = x"0" ];then - echo "TEST STATUS: $failed"; - else - echo "TEST STATUS: $failed"; - fi + echo "TEST STATUS: $failed failures"; + test x"$failed" = x"0" || { +cat <