summaryrefslogtreecommitdiffstats
path: root/net/test
diff options
context:
space:
mode:
authorrsimha@google.com <rsimha@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-08 20:56:12 +0000
committerrsimha@google.com <rsimha@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-09-08 20:56:12 +0000
commit7b09361322a9a96e24f3566730fd930150b7ab66 (patch)
tree998ca3ce2139ac574a84986e087ec6672190f092 /net/test
parenteeac5227cf399db4c7ac643d8d8057128c25f9c2 (diff)
downloadchromium_src-7b09361322a9a96e24f3566730fd930150b7ab66.zip
chromium_src-7b09361322a9a96e24f3566730fd930150b7ab66.tar.gz
chromium_src-7b09361322a9a96e24f3566730fd930150b7ab66.tar.bz2
Revert 155587 - 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 TBR=rsimha@chromium.org Review URL: https://chromiumcodereview.appspot.com/10910150 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@155594 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/test')
-rw-r--r--net/test/local_test_server.cc4
-rw-r--r--net/test/python_utils.cc8
-rw-r--r--net/test/python_utils.h8
3 files changed, 0 insertions, 20 deletions
diff --git a/net/test/local_test_server.cc b/net/test/local_test_server.cc
index 8bddbc3a..af94a50 100644
--- a/net/test/local_test_server.cc
+++ b/net/test/local_test_server.cc
@@ -105,10 +105,6 @@ 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;
diff --git a/net/test/python_utils.cc b/net/test/python_utils.cc
index 7e0e79a..0eec816 100644
--- a/net/test/python_utils.cc
+++ b/net/test/python_utils.cc
@@ -14,7 +14,6 @@
#include "base/utf_string_conversions.h"
const char kPythonPathEnv[] = "PYTHONPATH";
-const char kPythonUnbufferedEnv[] = "PYTHONUNBUFFERED";
void AppendToPythonPath(const FilePath& dir) {
scoped_ptr<base::Environment> env(base::Environment::Create());
@@ -116,10 +115,3 @@ bool GetPythonRunTime(FilePath* dir) {
#endif
return true;
}
-
-void EnablePythonUnbufferedMode() {
- // Python output will be unbuffered if kPythonUnbufferedEnv is set to any
- // non-empty string.
- scoped_ptr<base::Environment> env(base::Environment::Create());
- env->SetVar(kPythonUnbufferedEnv, "true");
-}
diff --git a/net/test/python_utils.h b/net/test/python_utils.h
index 377a3ec..583fb27 100644
--- a/net/test/python_utils.h
+++ b/net/test/python_utils.h
@@ -12,9 +12,6 @@ class FilePath;
// This is the python path variable name.
extern const char kPythonPathEnv[];
-// This is the python unbuffered variable name.
-extern const char kPythonUnbufferedEnv[];
-
// Appends the dir to python path environment variable.
void AppendToPythonPath(const FilePath& dir);
@@ -24,9 +21,4 @@ bool GetPyProtoPath(FilePath* dir);
// Returns the path that should be used to launch Python.
bool GetPythonRunTime(FilePath* path) WARN_UNUSED_RESULT;
-// Sets the environment variable that forces python console output to be
-// unbuffered. Used so that buffered logs don't interfere with gtest logs after
-// a test has been run.
-void EnablePythonUnbufferedMode();
-
#endif // NET_TEST_PYTHON_UTILS_H_