summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-10-08 20:30:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:15:19 -0500
commit0e66bafd47df4712666a022f7c4ad04faef7ac3c (patch)
tree073eaca7f45c0a2c758357639697663f31c566a1 /source3
parente739baf3a1f61b6e2b7d52452c30b52ba1c933b4 (diff)
downloadsamba-0e66bafd47df4712666a022f7c4ad04faef7ac3c.tar.gz
samba-0e66bafd47df4712666a022f7c4ad04faef7ac3c.tar.bz2
samba-0e66bafd47df4712666a022f7c4ad04faef7ac3c.zip
r19169: port the trick to only display the smbd and nmbd log output
of the current test metze (This used to be commit f668d4839de0ec98fcacf2efb6a69970757bebdd)
Diffstat (limited to 'source3')
-rw-r--r--source3/script/tests/test_functions.sh31
1 files changed, 27 insertions, 4 deletions
diff --git a/source3/script/tests/test_functions.sh b/source3/script/tests/test_functions.sh
index badbdd5b8e..913e93210a 100644
--- a/source3/script/tests/test_functions.sh
+++ b/source3/script/tests/test_functions.sh
@@ -145,6 +145,13 @@ testit() {
TEST_PCAP="$PREFIX/test_${shname}_${UNIQUE_PID}.pcap"
trap "rm -f $TEST_LOG $TEST_PCAP" EXIT
+ if [ -z "$nmbd_log_size" ]; then
+ nmbd_log_size=`wc -l < $NMBD_TEST_LOG`;
+ fi
+ 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)"
@@ -175,13 +182,29 @@ testit() {
( $cmdline > $TEST_LOG 2>&1 )
status=$?
+ # show any additional output from smbd that has happened in this test
+ samba3_nmbd_test_log && {
+ new_log_size=`wc -l < $NMBD_TEST_LOG`;
+ test "$new_log_size" = "$nmbd_log_size" || {
+ echo "NMBD OUTPUT:";
+ incr_log_size=`expr $new_log_size - $nmbd_log_size`;
+ tail -$incr_log_size $NMBD_TEST_LOG;
+ nmbd_log_size=$new_log_size;
+ }
+ }
+ samba3_smbd_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;
- samba3_nmbd_test_log && echo "NMBD OUTPUT:";
- samba3_nmbd_test_log && cat $NMBD_TEST_LOG;
- samba3_smbd_test_log && echo "SMBD OUTPUT:";
- samba3_smbd_test_log && cat $SMBD_TEST_LOG;
rm -f $TEST_LOG;
if [ x"$MAKE_TEST_ENABLE_PCAP" = x"yes" ];then
echo "TEST PCAP: $TEST_PCAP"