Amend Android scripting to allow remote execution.

These changes allow scripts to work over ssh with appropriate port
forwarding (with local device and remote host):

 - use predictable port number on the host when setting up local origin
   for mojo: urls
 - use fixed port when running apptests
 - change the default ports to avoid the ones used by system services on
   some ubiquitous VM setups

R=etiennej@chromium.org

Review URL: https://codereview.chromium.org/1189123002.

Cr-Mirrored-From: https://github.com/domokit/mojo
Cr-Mirrored-Commit: 4890edece25d92d994e2f816f247c9b6d73a336a
2 files changed
tree: b0c023a34c132d52bb34d66ca24fce395d6fc67b
  1. android_stack_parser/
  2. devtoolslib/
  3. debugger
  4. README.md
README.md

Devtools

Unopinionated tools for running, debugging and testing Mojo apps.

The repo consists of:

  • devtoolslib - Python module containing the core scripting functionality for running Mojo apps: shell abstraction with implementations for Android and Linux and support for apptest frameworks
  • executable scripts - example embedders of devtoolslib and other utils

Embedding devtoolslib

As devtools carry no assumptions about build system or file layout being used, the primary way of using devtools now is to embed the functionality provided by devtoolslib in a thin wrapper script. For examples, one can refer to mojo's shell runner and apptest runner.

Executable scripts

The set of executable scripts is WIP. We currently offer:

  • debugger - allowing to send commands to the mojo:debugger app running in the shell, allowing e.g. to interactively start and stop tracing

Install

git clone https://github.com/domokit/devtools.git

File location

The library is canonically developed in the mojo repository, https://github.com/domokit/devtools is a mirror allowing to consume it separately.