summaryrefslogtreecommitdiffstats
path: root/net/test/python_utils_unittest.cc
diff options
context:
space:
mode:
authorrsimha@google.com <rsimha@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-12 21:17:21 +0000
committerrsimha@google.com <rsimha@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-12 21:17:21 +0000
commit831b9b4e7a2b3754690aed8d4ec2a7b3e64877b5 (patch)
tree2094d028998df6193be2adf01c547dfd84a312ac /net/test/python_utils_unittest.cc
parent8b7c93cd2f8a7046d697b89e6ed66d79489021b4 (diff)
downloadchromium_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/python_utils_unittest.cc')
-rw-r--r--net/test/python_utils_unittest.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/test/python_utils_unittest.cc b/net/test/python_utils_unittest.cc
index f81a440..0114774 100644
--- a/net/test/python_utils_unittest.cc
+++ b/net/test/python_utils_unittest.cc
@@ -45,11 +45,12 @@ TEST(PythonUtils, Append) {
}
TEST(PythonUtils, PythonRunTime) {
- CommandLine cmd_line(CommandLine::NO_PROGRAM);
- EXPECT_TRUE(GetPythonCommand(&cmd_line));
+ FilePath dir;
+ EXPECT_TRUE(GetPythonRunTime(&dir));
// Run a python command to print a string and make sure the output is what
// we want.
+ CommandLine cmd_line(dir);
cmd_line.AppendArg("-c");
std::string input("PythonUtilsTest");
std::string python_cmd = StringPrintf("print '%s';", input.c_str());