summaryrefslogtreecommitdiff
path: root/source4/script
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2006-09-15 03:24:15 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:18:43 -0500
commitc7723f6eaf2a3d5fd32f530d0b88821c6d4246c7 (patch)
tree25eaefa9a9b5436235ad4b364e3385142df32e5c /source4/script
parent182ab7107c13046c650f51c0a4a55955cc38fa24 (diff)
downloadsamba-c7723f6eaf2a3d5fd32f530d0b88821c6d4246c7.tar.gz
samba-c7723f6eaf2a3d5fd32f530d0b88821c6d4246c7.tar.bz2
samba-c7723f6eaf2a3d5fd32f530d0b88821c6d4246c7.zip
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)
Diffstat (limited to 'source4/script')
-rwxr-xr-xsource4/script/tests/test_functions.sh16
1 files changed, 14 insertions, 2 deletions
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 "=========================================="