summaryrefslogtreecommitdiffstats
path: root/net/test
diff options
context:
space:
mode:
authorrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-01 19:56:46 +0000
committerrsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-01 19:56:46 +0000
commit3f864c9e42e237796ce4abbd4e6ce0e73dd9d2a1 (patch)
tree79d43c3d85afb774a0c88937b21f99aac0f78101 /net/test
parent9cb5cc705b1df14ac0854dda49f47d055cb57f2d (diff)
downloadchromium_src-3f864c9e42e237796ce4abbd4e6ce0e73dd9d2a1.zip
chromium_src-3f864c9e42e237796ce4abbd4e6ce0e73dd9d2a1.tar.gz
chromium_src-3f864c9e42e237796ce4abbd4e6ce0e73dd9d2a1.tar.bz2
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
Diffstat (limited to 'net/test')
-rw-r--r--net/test/test_server.cc4
1 files changed, 4 insertions, 0 deletions
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) {