summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--chrome/browser/safe_browsing/safe_browsing_test.cc3
-rw-r--r--net/test/python_utils.cc2
-rw-r--r--net/tools/testserver/testserver_base.py17
3 files changed, 16 insertions, 6 deletions
diff --git a/chrome/browser/safe_browsing/safe_browsing_test.cc b/chrome/browser/safe_browsing/safe_browsing_test.cc
index 692aa0c..cad8262 100644
--- a/chrome/browser/safe_browsing/safe_browsing_test.cc
+++ b/chrome/browser/safe_browsing/safe_browsing_test.cc
@@ -438,9 +438,8 @@ class SafeBrowsingServerTestHelper
DISALLOW_COPY_AND_ASSIGN(SafeBrowsingServerTestHelper);
};
-// See http://crbug.com/96459
IN_PROC_BROWSER_TEST_F(SafeBrowsingServerTest,
- DISABLED_SafeBrowsingServerTest) {
+ SafeBrowsingServerTest) {
LOG(INFO) << "Start test";
ASSERT_TRUE(InitSafeBrowsingService());
diff --git a/net/test/python_utils.cc b/net/test/python_utils.cc
index d819414..be9facf 100644
--- a/net/test/python_utils.cc
+++ b/net/test/python_utils.cc
@@ -119,11 +119,9 @@ bool GetPythonCommand(CommandLine* python_cmd) {
python_cmd->SetProgram(dir);
-#if defined(OS_POSIX)
// Launch python in unbuffered mode, so that python output doesn't mix with
// gtest output in buildbot log files. See http://crbug.com/147368.
python_cmd->AppendArg("-u");
-#endif
return true;
}
diff --git a/net/tools/testserver/testserver_base.py b/net/tools/testserver/testserver_base.py
index 076943e..835ec35 100644
--- a/net/tools/testserver/testserver_base.py
+++ b/net/tools/testserver/testserver_base.py
@@ -44,6 +44,19 @@ class FileMultiplexer(object):
self.__fd2.flush()
+def MultiplexerHack(std_fd, log_fd):
+ """Creates a FileMultiplexer that will write to both specified files.
+
+ When running on Windows XP bots, stdout and stderr will be invalid file
+ handles, so log_fd will be returned directly. (This does not occur if you
+ run the test suite directly from a console, but only if the output of the
+ test executable is redirected.)
+ """
+ if std_fd.fileno() <= 0:
+ return log_fd
+ return FileMultiplexer(std_fd, log_fd)
+
+
class TestServerRunner(object):
"""Runs a test server and communicates with the controlling C++ test code.
@@ -59,9 +72,9 @@ class TestServerRunner(object):
self.options, self.args = self.option_parser.parse_args()
logfile = open('testserver.log', 'w')
- sys.stderr = FileMultiplexer(sys.stderr, logfile)
+ sys.stderr = MultiplexerHack(sys.stderr, logfile)
if self.options.log_to_console:
- sys.stdout = FileMultiplexer(sys.stdout, logfile)
+ sys.stdout = MultiplexerHack(sys.stdout, logfile)
else:
sys.stdout = logfile