svn commit: samba r18571 - in branches/SAMBA_4_0/source/script/tests: .

tridge at samba.org tridge at samba.org
Fri Sep 15 22:39:31 GMT 2006


Author: tridge
Date: 2006-09-15 22:39:30 +0000 (Fri, 15 Sep 2006)
New Revision: 18571

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18571

Log:

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.

Modified:
   branches/SAMBA_4_0/source/script/tests/selftest.sh
   branches/SAMBA_4_0/source/script/tests/test_functions.sh
   branches/SAMBA_4_0/source/script/tests/tests_all.sh
   branches/SAMBA_4_0/source/script/tests/tests_client.sh
   branches/SAMBA_4_0/source/script/tests/tests_quick.sh


Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/selftest.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/selftest.sh	2006-09-15 21:39:38 UTC (rev 18570)
+++ branches/SAMBA_4_0/source/script/tests/selftest.sh	2006-09-15 22:39:30 UTC (rev 18571)
@@ -107,8 +107,10 @@
  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 @@
     done
 fi
 
-teststatus $ARG0 $failed
+teststatus $ARG0 $totalfailed

Modified: branches/SAMBA_4_0/source/script/tests/test_functions.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/test_functions.sh	2006-09-15 21:39:38 UTC (rev 18570)
+++ branches/SAMBA_4_0/source/script/tests/test_functions.sh	2006-09-15 22:39:30 UTC (rev 18571)
@@ -100,7 +100,7 @@
 		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 @@
 	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 <<EOF	    
+************************
+*** TESTSUITE FAILED ***
+************************
+EOF
+	}
 	exit $failed
 }
 
@@ -180,3 +183,6 @@
     export MALLOC_CHECK_
 fi
 
+# initialise the local failed variable to zero when starting each of the tests
+failed=0
+

Modified: branches/SAMBA_4_0/source/script/tests/tests_all.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/tests_all.sh	2006-09-15 21:39:38 UTC (rev 18570)
+++ branches/SAMBA_4_0/source/script/tests/tests_all.sh	2006-09-15 22:39:30 UTC (rev 18571)
@@ -1,16 +1,16 @@
 #!/bin/sh
- $SRCDIR/script/tests/test_ejs.sh $DOMAIN $USERNAME $PASSWORD || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_ldap.sh $SERVER $USERNAME $PASSWORD || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_nbt.sh $SERVER || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_quick.sh //$SERVER/cifs $USERNAME $PASSWORD "" || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_rpc.sh $SERVER $USERNAME $PASSWORD $DOMAIN || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_net.sh $SERVER $USERNAME $PASSWORD $DOMAIN || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_session_key.sh $SERVER $USERNAME $PASSWORD $DOMAIN $NETBIOSNAME || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_binding_string.sh $SERVER $USERNAME $PASSWORD $DOMAIN || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_echo.sh $SERVER $USERNAME $PASSWORD $DOMAIN || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_posix.sh //$SERVER/tmp $USERNAME $PASSWORD "" || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_local.sh || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_pidl.sh || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_smbclient.sh $SERVER $USERNAME $PASSWORD $DOMAIN $PREFIX || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_cifsdd.sh $SERVER $USERNAME $PASSWORD $DOMAIN || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_simple.sh //$SERVER/simple $USERNAME $PASSWORD "" || failed=`expr $failed + $?`
+ $SRCDIR/script/tests/test_ejs.sh $DOMAIN $USERNAME $PASSWORD || totalfailed=`expr $totalfailed + $?`
+ $SRCDIR/script/tests/test_ldap.sh $SERVER $USERNAME $PASSWORD || totalfailed=`expr $totalfailed + $?`
+ $SRCDIR/script/tests/test_nbt.sh $SERVER || totalfailed=`expr $totalfailed + $?`
+ $SRCDIR/script/tests/test_quick.sh //$SERVER/cifs $USERNAME $PASSWORD "" || totalfailed=`expr $totalfailed + $?`
+ $SRCDIR/script/tests/test_rpc.sh $SERVER $USERNAME $PASSWORD $DOMAIN || totalfailed=`expr $totalfailed + $?`
+ $SRCDIR/script/tests/test_net.sh $SERVER $USERNAME $PASSWORD $DOMAIN || totalfailed=`expr $totalfailed + $?`
+ $SRCDIR/script/tests/test_session_key.sh $SERVER $USERNAME $PASSWORD $DOMAIN $NETBIOSNAME || totalfailed=`expr $totalfailed + $?`
+ $SRCDIR/script/tests/test_binding_string.sh $SERVER $USERNAME $PASSWORD $DOMAIN || totalfailed=`expr $totalfailed + $?`
+ $SRCDIR/script/tests/test_echo.sh $SERVER $USERNAME $PASSWORD $DOMAIN || totalfailed=`expr $totalfailed + $?`
+ $SRCDIR/script/tests/test_posix.sh //$SERVER/tmp $USERNAME $PASSWORD "" || totalfailed=`expr $totalfailed + $?`
+ $SRCDIR/script/tests/test_local.sh || totalfailed=`expr $totalfailed + $?`
+ $SRCDIR/script/tests/test_pidl.sh || totalfailed=`expr $totalfailed + $?`
+ $SRCDIR/script/tests/test_smbclient.sh $SERVER $USERNAME $PASSWORD $DOMAIN $PREFIX || totalfailed=`expr $totalfailed + $?`
+ $SRCDIR/script/tests/test_cifsdd.sh $SERVER $USERNAME $PASSWORD $DOMAIN || totalfailed=`expr $totalfailed + $?`
+ $SRCDIR/script/tests/test_simple.sh //$SERVER/simple $USERNAME $PASSWORD "" || totalfailed=`expr $totalfailed + $?`

Modified: branches/SAMBA_4_0/source/script/tests/tests_client.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/tests_client.sh	2006-09-15 21:39:38 UTC (rev 18570)
+++ branches/SAMBA_4_0/source/script/tests/tests_client.sh	2006-09-15 22:39:30 UTC (rev 18571)
@@ -1,3 +1,3 @@
 #!/bin/sh
- $SRCDIR/script/tests/test_smbclient.sh $SERVER $USERNAME $PASSWORD $DOMAIN $PREFIX || failed=`expr $failed + $?`
- $SRCDIR/script/tests/test_cifsdd.sh $SERVER $USERNAME $PASSWORD $DOMAIN || failed=`expr $failed + $?`
+ $SRCDIR/script/tests/test_smbclient.sh $SERVER $USERNAME $PASSWORD $DOMAIN $PREFIX || totalfailed=`expr $totalfailed + $?`
+ $SRCDIR/script/tests/test_cifsdd.sh $SERVER $USERNAME $PASSWORD $DOMAIN || totalfailed=`expr $totalfailed + $?`

Modified: branches/SAMBA_4_0/source/script/tests/tests_quick.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/tests_quick.sh	2006-09-15 21:39:38 UTC (rev 18570)
+++ branches/SAMBA_4_0/source/script/tests/tests_quick.sh	2006-09-15 22:39:30 UTC (rev 18571)
@@ -4,10 +4,9 @@
 TORTURE_QUICK="yes"
 export TORTURE_QUICK
 
-$SRCDIR/script/tests/test_ejs.sh $DOMAIN $USERNAME $PASSWORD || failed=`expr $failed + $?`
-$SRCDIR/script/tests/test_ldap.sh $SERVER $USERNAME $PASSWORD || failed=`expr $failed + $?`
-$SRCDIR/script/tests/test_nbt.sh $SERVER || failed=`expr $failed + $?`
-$SRCDIR/script/tests/test_quick.sh //$SERVER/cifs $USERNAME $PASSWORD "" || failed=`expr $failed + $?`
-$SRCDIR/script/tests/test_rpc_quick.sh $SERVER $USERNAME $PASSWORD $DOMAIN || failed=`expr $failed + $?`
-$SRCDIR/script/tests/test_cifsposix.sh //$SERVER/cifsposixtestshare $USERNAME $PASSWORD "" || failed=`expr $failed + $?`
-
+$SRCDIR/script/tests/test_ejs.sh $DOMAIN $USERNAME $PASSWORD || totalfailed=`expr $totalfailed + $?`
+$SRCDIR/script/tests/test_ldap.sh $SERVER $USERNAME $PASSWORD || totalfailed=`expr $totalfailed + $?`
+$SRCDIR/script/tests/test_nbt.sh $SERVER || totalfailed=`expr $totalfailed + $?`
+$SRCDIR/script/tests/test_quick.sh //$SERVER/cifs $USERNAME $PASSWORD "" || totalfailed=`expr $totalfailed + $?`
+$SRCDIR/script/tests/test_rpc_quick.sh $SERVER $USERNAME $PASSWORD $DOMAIN || totalfailed=`expr $totalfailed + $?`
+$SRCDIR/script/tests/test_cifsposix.sh //$SERVER/cifsposixtestshare $USERNAME $PASSWORD "" || totalfailed=`expr $totalfailed + $?`



More information about the samba-cvs mailing list