From 3f864c9e42e237796ce4abbd4e6ce0e73dd9d2a1 Mon Sep 17 00:00:00 2001 From: "rsimha@chromium.org" Date: Tue, 1 Feb 2011 19:56:46 +0000 Subject: Silence testserver logs when tests are run in non-verbose mode The console output from testserver.py, chromiumsync.py and xmppserver.py during sync integration test runs is pretty chatty, and could do with being disabled by default. In addition, testserver.py spits out logs for non-sync tests even when the tests are run in non-verbose mode. This patch adds a switch to testserver.py called "log-to-console", and ties it up to the logging level returned by logging::GetMinLogLevel(). This way, testserver logs are printed on the console (in addition to being written to testserver.log) when tests are run in verbose mode. However, when tests are run in non-verbose mode, testserver logs are only written to the log file, but not to the console. BUG=71241 TEST=sync_integration_tests Review URL: http://codereview.chromium.org/6404003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73330 0039d316-1c4b-4281-b951-d872f2087c98 --- net/test/test_server.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'net/test') diff --git a/net/test/test_server.cc b/net/test/test_server.cc index 8f4e8d6..fcc7d79a 100644 --- a/net/test/test_server.cc +++ b/net/test/test_server.cc @@ -348,6 +348,10 @@ bool TestServer::AddCommandLineArguments(CommandLine* command_line) const { certificates_dir_.AppendASCII("ok_cert.pem")); command_line->AppendSwitchPath("policy-cert-chain", GetRootCertificatePath()); + if (logging::GetMinLogLevel() == logging::LOG_VERBOSE) { + command_line->AppendArg("--log-to-console"); + } + if (type_ == TYPE_FTP) { command_line->AppendArg("-f"); } else if (type_ == TYPE_SYNC) { -- cgit v1.1