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

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

Issue 1397193005: mojo_run: support parallel Android runs of mojo_run. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 2 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
Index: mojo/devtools/common/devtoolslib/shell.py
diff --git a/mojo/devtools/common/devtoolslib/shell.py b/mojo/devtools/common/devtoolslib/shell.py
index c142611f15803584bd5e9e647a48decc5f4815e4..b7f39d85d7b065d56fa305c18d234c02b56bdc5b 100644
--- a/mojo/devtools/common/devtoolslib/shell.py
+++ b/mojo/devtools/common/devtoolslib/shell.py
@@ -6,7 +6,7 @@
class Shell(object):
"""Represents an abstract Mojo shell."""
- def serve_local_directory(self, local_dir_path, port=0):
+ def serve_local_directory(self, local_dir_path, port=0, free_host_port=False):
"""Serves the content of the local (host) directory, making it available to
the shell under the url returned by the function.
@@ -15,14 +15,19 @@ class Shell(object):
Args:
local_dir_path: path to the directory to be served
- port: port at which the server will be available to the shell
+ port: port at which the server will be available to the shell. On Android
+ this can be different from the port on which the server runs on the
+ host.
+ free_host_port: spawn the server a system allocated port. This is ignored
+ on Linux, where |port| indicates the port on which the server will be
+ spawned.
Returns:
The url that the shell can use to access the content of |local_dir_path|.
"""
raise NotImplementedError()
- def serve_local_directories(self, mappings, port=0):
+ def serve_local_directories(self, mappings, port=0, free_host_port=False):
"""Serves the content of the local (host) directories, making it available
to the shell under the url returned by the function.
@@ -35,7 +40,12 @@ class Shell(object):
|local_base_path_list|. The prefixes should skip the leading slash.
The first matching prefix and the first location that contains the
requested file will be used each time.
- port: port at which the server will be available to the shell
+ port: port at which the server will be available to the shell. On Android
+ this can be different from the port on which the server runs on the
+ host.
+ free_host_port: spawn the server a system allocated port. This is ignored
+ on Linux, where |port| indicates the port on which the server will be
+ spawned.
Returns:
The url that the shell can use to access the server.

Powered by Google App Engine
This is Rietveld 408576698