summaryrefslogtreecommitdiffstats
path: root/mandoline/tools
diff options
context:
space:
mode:
authormsw <msw@chromium.org>2015-06-01 18:27:22 -0700
committerCommit bot <commit-bot@chromium.org>2015-06-02 01:28:51 +0000
commit7e92ef9c6a28987cb4089bdf2ed4b9a8068543e2 (patch)
treecbed340539c05afc6314b69f862bea79e1ec8ac2 /mandoline/tools
parent6a44de931993f66de18a71450a517a53c753e5ef (diff)
downloadchromium_src-7e92ef9c6a28987cb4089bdf2ed4b9a8068543e2.zip
chromium_src-7e92ef9c6a28987cb4089bdf2ed4b9a8068543e2.tar.gz
chromium_src-7e92ef9c6a28987cb4089bdf2ed4b9a8068543e2.tar.bz2
Use base_test_runner's http server in Mojo Android scripts.
Use build/android/pylib/base/base_test_runner.py's http server. The server is used to host build directory files for devices. It's also used with --map-origins to host local directories. (the custom code was written to avoid pylib in the Mojo repo) Add --verbose flag support to android_mojo_shell.py. Some refactoring for simplicity. BUG=486220 TEST=apptest_runner.py, android_mojo_shell.py, and android_run_mandoline.py still work as expected. R=sky@chromium.org Review URL: https://codereview.chromium.org/1164663002 Cr-Commit-Position: refs/heads/master@{#332307}
Diffstat (limited to 'mandoline/tools')
-rwxr-xr-xmandoline/tools/android_run_mandoline.py16
1 files changed, 7 insertions, 9 deletions
diff --git a/mandoline/tools/android_run_mandoline.py b/mandoline/tools/android_run_mandoline.py
index 6c015ad..d5540a4 100755
--- a/mandoline/tools/android_run_mandoline.py
+++ b/mandoline/tools/android_run_mandoline.py
@@ -28,23 +28,21 @@ def main():
dest='debug', action='store_false')
parser.add_argument('--target-cpu', help='CPU architecture to run for.',
choices=['x64', 'x86', 'arm'], default='arm')
- parser.add_argument('--target-device', help='Device to run on.')
+ parser.add_argument('--device', help='Serial number of the target device.')
parser.add_argument('--gdb', help='Run gdb',
default=False, action='store_true')
- launcher_args, args = parser.parse_known_args()
+ runner_args, args = parser.parse_known_args()
config = Config(target_os=Config.OS_ANDROID,
- target_cpu=launcher_args.target_cpu,
- is_debug=launcher_args.debug,
+ target_cpu=runner_args.target_cpu,
+ is_debug=runner_args.debug,
apk_name="Mandoline.apk")
- shell = AndroidShell(config, launcher_args.target_device)
-
- extra_shell_args = shell.PrepareShellRun(gdb=launcher_args.gdb)
- args.extend(extra_shell_args)
+ shell = AndroidShell(config)
+ args.extend(shell.PrepareShellRun(None, runner_args.device, runner_args.gdb))
shell.CleanLogs()
p = shell.ShowLogs()
- shell.StartShell(args, sys.stdout, p.terminate, launcher_args.gdb)
+ shell.StartShell(args, sys.stdout, p.terminate, runner_args.gdb)
return 0