From: Andrew Tridgell Date: Wed, 12 Aug 2009 04:38:55 +0000 (+1000) Subject: print server log on stderr as well as to log file X-Git-Tag: talloc-2.0.0~426 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0ae3912f328250703e921ec78eb9add98cbfcf7c;p=thirdparty%2Fsamba.git print server log on stderr as well as to log file I think we are missing some important messages from the server during 'make test' because we don't show the log file contents during runs. This patch uses tee to put the log messages to stderr so we can see any server messages associated with the test that caused them. --- diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index 0f909ce4b2f..81ad09dbc00 100644 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -88,9 +88,12 @@ sub check_or_start($$$) my $pid = fork(); if ($pid == 0) { open STDIN, $env_vars->{SAMBA_TEST_FIFO}; - open STDOUT, ">$env_vars->{SAMBA_TEST_LOG}"; + # we want out from samba to go to the log file, but also + # to the users terminal when running 'make test' on the command + # line. This puts it on stderr on the terminal + open STDOUT, "| tee $env_vars->{SAMBA_TEST_LOG} 1>&2"; open STDERR, '>&STDOUT'; - + SocketWrapper::set_default_iface($env_vars->{SOCKET_WRAPPER_DEFAULT_IFACE}); my $valgrind = "";