summaryrefslogtreecommitdiff
path: root/source4/script
diff options
context:
space:
mode:
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 "=========================================="