From c7723f6eaf2a3d5fd32f530d0b88821c6d4246c7 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 15 Sep 2006 03:24:15 +0000 Subject: r18540: show the additional smbd output from each test, rather than only showing on test failure and showing all the smbd output each time. (This used to be commit 1dfac4666423d7e0565795e3eae72da7e25a5b54) --- source4/script/tests/test_functions.sh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'source4/script') diff --git a/source4/script/tests/test_functions.sh b/source4/script/tests/test_functions.sh index 6baec4982d..e53bac1909 100755 --- a/source4/script/tests/test_functions.sh +++ b/source4/script/tests/test_functions.sh @@ -89,6 +89,10 @@ testit() { 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 @@ testit() { ( $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 "==========================================" -- cgit