summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorstip <stip@chromium.org>2015-11-11 11:40:57 -0800
committerCommit bot <commit-bot@chromium.org>2015-11-11 19:42:27 +0000
commit96bcef18e5a58c49881a18562435b0eff8990a39 (patch)
tree9e114909c286d75689294e051968aa7c9efa03b5 /build
parent43c77e205b1826138427d7dd3be8b9630909c756 (diff)
downloadchromium_src-96bcef18e5a58c49881a18562435b0eff8990a39.zip
chromium_src-96bcef18e5a58c49881a18562435b0eff8990a39.tar.gz
chromium_src-96bcef18e5a58c49881a18562435b0eff8990a39.tar.bz2
Turn off PYTHONUNBUFFERED to fix net_unittests and friends.
BUG=525873 Review URL: https://codereview.chromium.org/1439663002 Cr-Commit-Position: refs/heads/master@{#359141}
Diffstat (limited to 'build')
-rw-r--r--build/android/pylib/chrome_test_server_spawner.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/build/android/pylib/chrome_test_server_spawner.py b/build/android/pylib/chrome_test_server_spawner.py
index 99f4b5dc..a77a0c9 100644
--- a/build/android/pylib/chrome_test_server_spawner.py
+++ b/build/android/pylib/chrome_test_server_spawner.py
@@ -224,11 +224,18 @@ class TestServerThread(threading.Thread):
command = [os.path.join(command, 'net', 'tools', 'testserver',
'testserver.py')] + self.command_line
logging.info('Running: %s', command)
+
+ # Disable PYTHONUNBUFFERED because it has a bad interaction with the
+ # testserver. Remove once this interaction is fixed.
+ unbuf = os.environ.pop('PYTHONUNBUFFERED', None)
+
# Pass DIR_SOURCE_ROOT as the child's working directory so that relative
# paths in the arguments are resolved correctly.
self.process = subprocess.Popen(
command, preexec_fn=self._CloseUnnecessaryFDsForTestServerProcess,
cwd=constants.DIR_SOURCE_ROOT)
+ if unbuf:
+ os.environ['PYTHONUNBUFFERED'] = unbuf
if self.process:
if self.pipe_out:
self.is_ready = self._WaitToStartAndGetPortFromTestServer()