提交 aabc059e 编写于 作者: A Adam Barth

Forward the Observatory port in sky_tool

Fixes #275

R=eseidel@chromium.org, eseidel@google.com

Review URL: https://codereview.chromium.org/1216283003.
上级 4dc47275
......@@ -20,6 +20,7 @@ LIB_DIR = os.path.realpath(os.path.dirname(os.path.abspath(__file__)))
SKY_PACKAGE_ROOT = os.path.realpath(os.path.dirname(LIB_DIR))
SKY_SERVER_PORT = 9888
OBSERVATORY_PORT = 8181
APK_NAME = 'SkyDemo.apk'
ANDROID_PACKAGE = "org.domokit.sky.demo"
# FIXME: This assumes adb is in $PATH, we could look for ANDROID_HOME, etc?
......@@ -169,6 +170,12 @@ class StartSky(object):
subprocess.check_call([ADB_PATH, 'install', '-r', apk_path])
# Set up port forwarding for observatory
observatory_port_string = 'tcp:%s' % OBSERVATORY_PORT
subprocess.check_call([
ADB_PATH, 'forward', observatory_port_string, observatory_port_string
])
sky_server_port = SKY_SERVER_PORT
pids['sky_server_port'] = sky_server_port
if _port_in_use(sky_server_port):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册