diff options
author | rsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-08 17:45:44 +0000 |
---|---|---|
committer | rsimha@chromium.org <rsimha@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-08 17:45:44 +0000 |
commit | 90c5f4777fc3a4c90ef7c1783d7cfee4f7a2cff3 (patch) | |
tree | 366f85bb78d4180934116927958932f1cbf30204 /net/test/local_test_server.cc | |
parent | e6ff9116ad6375e83aac9c0d1447cf7122caee28 (diff) | |
download | chromium_src-90c5f4777fc3a4c90ef7c1783d7cfee4f7a2cff3.zip chromium_src-90c5f4777fc3a4c90ef7c1783d7cfee4f7a2cff3.tar.gz chromium_src-90c5f4777fc3a4c90ef7c1783d7cfee4f7a2cff3.tar.bz2 |
Force python test server output to be unbuffered, so it doesn't mix with gtest output
In browser tests that use a local python server, the python output in the test logs sometimes overlaps with gtest output, resulting in gtest falsely detecting passing tests as incomplete. This is a result of python's default use of buffered output, which gets written to the log file out of order.
This patch forces the python process for local test servers to use unbuffered mode. This way, by the time gtest is ready to log a passing test, all testserver output is already written to the log file.
BUG=147368
TEST= See sync integration test output when it is redirected to a log file, and make sure there are no false negatives.
Review URL: https://chromiumcodereview.appspot.com/10919165
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155587 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/test/local_test_server.cc')
-rw-r--r-- | net/test/local_test_server.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/net/test/local_test_server.cc b/net/test/local_test_server.cc index af94a50..8bddbc3a 100644 --- a/net/test/local_test_server.cc +++ b/net/test/local_test_server.cc @@ -105,6 +105,10 @@ bool LocalTestServer::Start() { if (!SetPythonPath()) return false; + // Ensures that python testserver output, if any, will not clash with + // post-test gtest output. + EnablePythonUnbufferedMode(); + if (!LaunchPython(testserver_path)) return false; |