diff options
author | stip <stip@chromium.org> | 2015-11-11 11:40:57 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-11-11 19:42:27 +0000 |
commit | 96bcef18e5a58c49881a18562435b0eff8990a39 (patch) | |
tree | 9e114909c286d75689294e051968aa7c9efa03b5 /build | |
parent | 43c77e205b1826138427d7dd3be8b9630909c756 (diff) | |
download | chromium_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.py | 7 |
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() |