summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authortonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-18 17:46:49 +0000
committertonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-18 17:46:49 +0000
commit3254c84298716f1c0bc5621129c41052fa594d2a (patch)
tree6d6c950330eb8ee48805a8d46b43fdd52de128ab /build
parent357b51741519bad4cf3afc7a1603b9bb46556fe7 (diff)
downloadchromium_src-3254c84298716f1c0bc5621129c41052fa594d2a.zip
chromium_src-3254c84298716f1c0bc5621129c41052fa594d2a.tar.gz
chromium_src-3254c84298716f1c0bc5621129c41052fa594d2a.tar.bz2
Fix chrome remote control on android after r162150.
That revision changed build/android/pylib/forwarder to use forwarder2 which caused CRC to inherit forwarder2. This broke two things: 1. Since there is now a host_forwarder in addition to device_forwarder, we can't pass 'unused' as the build_type to Forwarder.__init__ because it is used for starting the host_forwarder. 2. When using the Forwarder class directly, the TEST_SERVER_PORT_FILE may not exist. So create it if it doesn't exist rather than asserting that it does. BUG=154412 TEST=Manual testing on linux Review URL: https://codereview.chromium.org/11195034 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@162732 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r--build/android/pylib/ports.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/build/android/pylib/ports.py b/build/android/pylib/ports.py
index e9b6b90..06b9f58 100644
--- a/build/android/pylib/ports.py
+++ b/build/android/pylib/ports.py
@@ -51,7 +51,8 @@ def AllocateTestServerPort():
fp_lock = open(constants.TEST_SERVER_PORT_LOCKFILE, 'w')
fcntl.flock(fp_lock, fcntl.LOCK_EX)
# Get current valid port and calculate next valid port.
- assert os.path.exists(constants.TEST_SERVER_PORT_FILE)
+ if not os.path.exists(constants.TEST_SERVER_PORT_FILE):
+ ResetTestServerPortAllocation()
with open(constants.TEST_SERVER_PORT_FILE, 'r+') as fp:
port = int(fp.read())
ports_tried.append(port)