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

tridge at samba.org tridge at samba.org
Fri Sep 15 03:24:15 GMT 2006


Author: tridge
Date: 2006-09-15 03:24:15 +0000 (Fri, 15 Sep 2006)
New Revision: 18540

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

Log:

show the additional smbd output from each test, rather than only
showing on test failure and showing all the smbd output each time.

Modified:
   branches/SAMBA_4_0/source/script/tests/test_functions.sh


Changeset:
Modified: branches/SAMBA_4_0/source/script/tests/test_functions.sh
===================================================================
--- branches/SAMBA_4_0/source/script/tests/test_functions.sh	2006-09-14 20:08:21 UTC (rev 18539)
+++ branches/SAMBA_4_0/source/script/tests/test_functions.sh	2006-09-15 03:24:15 UTC (rev 18540)
@@ -89,6 +89,10 @@
 	trap "rm -f $TEST_LOG" EXIT
 	cmdline="$*"
 
+        if [ -z "$smbd_log_size" ]; then
+	    smbd_log_size=`wc -l < $SMBD_TEST_LOG`;
+	fi
+
 	if [ x"$RUN_FROM_BUILD_FARM" = x"yes" ];then
 		echo "--==--==--==--==--==--==--==--==--==--==--"
 		echo "Running test $name (level 0 stdout)"
@@ -114,11 +118,19 @@
 	
 	( $cmdline > $TEST_LOG 2>&1 )
 	status=$?
+	# show any additional output from smbd that has happened in this test
+	smbd_have_test_log && {		    
+	    new_log_size=`wc -l < $SMBD_TEST_LOG`;
+	    test "$new_log_size" = "$smbd_log_size" || {
+		echo "SMBD OUTPUT:";
+		incr_log_size=`expr $new_log_size - $smbd_log_size`;
+		tail -$incr_log_size $SMBD_TEST_LOG;
+		smbd_log_size=$new_log_size;
+	    }
+	}
 	if [ x"$status" != x"0" ]; then
 		echo "TEST OUTPUT:"
 		cat $TEST_LOG;
-		smbd_have_test_log && echo "SMBD OUTPUT:";
-		smbd_have_test_log && cat $SMBD_TEST_LOG;
 		rm -f $TEST_LOG;
 		if [ x"$RUN_FROM_BUILD_FARM" = x"yes" ];then
 			echo "=========================================="



More information about the samba-cvs mailing list