diff options
author | rsimha@google.com <rsimha@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-12 21:17:21 +0000 |
---|---|---|
committer | rsimha@google.com <rsimha@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-09-12 21:17:21 +0000 |
commit | 831b9b4e7a2b3754690aed8d4ec2a7b3e64877b5 (patch) | |
tree | 2094d028998df6193be2adf01c547dfd84a312ac /net/test/local_test_server_win.cc | |
parent | 8b7c93cd2f8a7046d697b89e6ed66d79489021b4 (diff) | |
download | chromium_src-831b9b4e7a2b3754690aed8d4ec2a7b3e64877b5.zip chromium_src-831b9b4e7a2b3754690aed8d4ec2a7b3e64877b5.tar.gz chromium_src-831b9b4e7a2b3754690aed8d4ec2a7b3e64877b5.tar.bz2 |
Revert 156361 - Take 2: 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 via the -u switch. 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/10907162
TBR=rsimha@google.com
Review URL: https://codereview.chromium.org/10911264
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@156376 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/test/local_test_server_win.cc')
-rw-r--r-- | net/test/local_test_server_win.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/net/test/local_test_server_win.cc b/net/test/local_test_server_win.cc index ba2a8cd..0b30312 100644 --- a/net/test/local_test_server_win.cc +++ b/net/test/local_test_server_win.cc @@ -20,7 +20,6 @@ #include "base/threading/thread.h" #include "base/utf_string_conversions.h" #include "base/win/scoped_handle.h" -#include "net/test/python_utils.h" #pragma comment(lib, "crypt32.lib") @@ -86,10 +85,15 @@ bool ReadData(HANDLE read_fd, HANDLE write_fd, namespace net { bool LocalTestServer::LaunchPython(const FilePath& testserver_path) { - CommandLine python_command(CommandLine::NO_PROGRAM); - if (!GetPythonCommand(&python_command)) + FilePath python_exe; + if (!PathService::Get(base::DIR_SOURCE_ROOT, &python_exe)) return false; + python_exe = python_exe + .Append(FILE_PATH_LITERAL("third_party")) + .Append(FILE_PATH_LITERAL("python_26")) + .Append(FILE_PATH_LITERAL("python.exe")); + CommandLine python_command(python_exe); python_command.AppendArgPath(testserver_path); if (!AddCommandLineArguments(&python_command)) return false; |