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

Unified Diff: sky/sdk/lib/sky_tool

Issue 1216283003: Forward the Observatory port in sky_tool (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/sdk/lib/sky_tool
diff --git a/sky/sdk/lib/sky_tool b/sky/sdk/lib/sky_tool
index dbaadac33b84830cc4447399d994f5dc6ba0d808..3ad920a802a06086b3836941436b0a12c462268f 100755
--- a/sky/sdk/lib/sky_tool
+++ b/sky/sdk/lib/sky_tool
@@ -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):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698