r18575: - use the right variable to teststatus
authorAndrew Tridgell <tridge@samba.org>
Fri, 15 Sep 2006 23:00:32 +0000 (23:00 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:18:49 +0000 (14:18 -0500)
- don't display the "(NN tests failed so far)" message unless a test
  has failed
(This used to be commit da37e963cef065bb1c50543596e352c78e712ddc)

source4/script/tests/selftest.sh
source4/script/tests/test_functions.sh

index a8acb823a96aaa057afa973ef87c9f67577328d9..021b713a02749f5403317bcfb8bc1183deacbe43 100755 (executable)
@@ -139,4 +139,4 @@ if [ "$count" != 0 ]; then
     done
 fi
 
-teststatus $ARG0 $totalfailed
+teststatus $ARG0 $failed
index 3d397ac2551155a0a12a5700ecdb8d81c0dcd7d7..29b03faf4253734cba66dec6d2d0be27d59cafda 100755 (executable)
@@ -100,7 +100,12 @@ testit() {
                date
                echo "Testing $name"
        else
-               echo "Testing $name (`expr $failed + $totalfailed` test failed so far)"
+               nf="`expr $failed + $totalfailed`";
+               if [ "$nf" = "0" ]; then 
+                   echo "Testing $name"
+               else 
+                   echo "Testing $name ($nf tests failed so far)"
+               fi
        fi
 
        smbd_check_only && SMBD_IS_UP="yes"