Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2387)

Unified Diff: build/android/pylib/forwarder.py

Issue 1028333002: Chromium -> Mojo roll. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/device/logcat_monitor_test.py ('k') | build/android/pylib/junit/test_runner.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/forwarder.py
diff --git a/build/android/pylib/forwarder.py b/build/android/pylib/forwarder.py
index 385966912f1a766a89857377305c80c610e44ea9..eb83d68444f87e2c0c788d16a9db9e8a8d7324f0 100644
--- a/build/android/pylib/forwarder.py
+++ b/build/android/pylib/forwarder.py
@@ -51,18 +51,12 @@ class Forwarder(object):
_DEVICE_FORWARDER_PATH = (constants.TEST_EXECUTABLE_DIR +
'/forwarder/device_forwarder')
_LOCK_PATH = '/tmp/chrome.forwarder.lock'
- _MULTIPROCESSING_ENV_VAR = 'CHROME_FORWARDER_USE_MULTIPROCESSING'
# Defined in host_forwarder_main.cc
_HOST_FORWARDER_LOG = '/tmp/host_forwarder_log'
_instance = None
@staticmethod
- def UseMultiprocessing():
- """Tells the forwarder that multiprocessing is used."""
- os.environ[Forwarder._MULTIPROCESSING_ENV_VAR] = '1'
-
- @staticmethod
def Map(port_pairs, device, tool=None):
"""Runs the forwarder.
@@ -245,13 +239,10 @@ class Forwarder(object):
def _GetPidForLock():
"""Returns the PID used for host_forwarder initialization.
- In case multi-process sharding is used, the PID of the "sharder" is used.
- The "sharder" is the initial process that forks that is the parent process.
- By default, multi-processing is not used. In that case the PID of the
- current process is returned.
+ The PID of the "sharder" is used to handle multiprocessing. The "sharder"
+ is the initial process that forks that is the parent process.
"""
- use_multiprocessing = Forwarder._MULTIPROCESSING_ENV_VAR in os.environ
- return os.getpgrp() if use_multiprocessing else os.getpid()
+ return os.getpgrp()
def _InitHostLocked(self):
"""Initializes the host forwarder daemon.
« no previous file with comments | « build/android/pylib/device/logcat_monitor_test.py ('k') | build/android/pylib/junit/test_runner.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698