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

Unified Diff: mojo/devtools/common/devtoolslib/android_shell.py

Issue 1436503002: devtools: new workflow for multiple simultaneous `mojo_run` runs. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Address Ben's comments. Created 5 years, 1 month 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 | mojo/devtools/common/devtoolslib/linux_shell.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/devtools/common/devtoolslib/android_shell.py
diff --git a/mojo/devtools/common/devtoolslib/android_shell.py b/mojo/devtools/common/devtoolslib/android_shell.py
index 400195ccc6311251aef0b736d8d9fa9028b0d5f3..7f69c08b0a956402262313f9a5d79927ae15a721 100644
--- a/mojo/devtools/common/devtoolslib/android_shell.py
+++ b/mojo/devtools/common/devtoolslib/android_shell.py
@@ -16,7 +16,7 @@ import threading
import time
import uuid
-from devtoolslib.http_server import start_http_server
+from devtoolslib import http_server
from devtoolslib.shell import Shell
from devtoolslib.utils import overrides
@@ -421,10 +421,13 @@ class AndroidShell(Shell):
logcat_watch_thread.start()
@overrides(Shell)
- def serve_local_directories(self, mappings, port=0, free_host_port=False):
+ def serve_local_directories(self, mappings, port=0, reuse_servers=False):
assert mappings
- host_port = 0 if free_host_port else port
- server_address = start_http_server(mappings, host_port=host_port)
+ if reuse_servers:
+ assert port, 'Cannot reuse the server when |port| is 0.'
+ server_address = ('127.0.0.1', port)
+ else:
+ server_address = http_server.start_http_server(mappings, port)
return 'http://127.0.0.1:%d/' % self._forward_device_port_to_host(
port, server_address[1])
« no previous file with comments | « no previous file | mojo/devtools/common/devtoolslib/linux_shell.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698