Basic ergonomics improvements for run_modular_tests

Allow users to specify which tests to run. If a test that doesn't exist
is requested print the list of tests.

Change-Id: I460ca70d9d00f2c20e46be253fbec756f830c960
3 files changed
tree: dacb7829f3f17ee51924f73141a5b599ebc05604
  1. .clang-format
  2. .gitignore
  3. .travis.yml
  9. docs/
  10. examples/
  11. infra/
  12. lib/
  13. services/
  14. src/
  15. tests/


Modular is the application platform of Fuchsia.

It provides a post-API programming model that allows applications to cooperate in a shared context without the need to call each other's APIs directly.


  1. Follow instructions in fuchsia for getting the source, setup, build and running Fuchsia.
  2. Follow instructions in ledger to setup the Ledger and all its dependencies including netstack and minfs.


On the Fuchsia command line you can start an example application flow like this:

@ bootstrap device_runner --user_shell=dummy_user_shell

A single application can be run using the dev_user_shell, for example:

@ bootstrap device_runner --user_shell=dev_user_shell --user_shell_args='--root_module=example_flutter_counter_parent,--root_link={"":5}'

The flags --user_shell and --user_shell_args are read by device_runner. The value of --user_shell is the application run as user shell. The value of --user_shell_args is a comma separated list of arguments passed to the user shell application. In this example, these arguments are in turn more flags. Commas inside the value of such arguments are escaped by backslashes. The value of --root_module selects the module to run. The value of --root_link is a JSON representation of the initial data the module is started with.

The dummy user name used by the dummy user shell can be set with --user:

@ bootstrap device_runner --user_shell=dummy_user_shell --user_shell_args=--user=dummy_user

Applications are generally referenced by URLs. If the application binary is in a location where application manager expects it (specifically /system/apps) the URL can be relative. Otherwise, the URL should be relative with an absolute path, or absolute altogether. For example (from test runner invocation):

@ bootstrap device_runner --user_shell=dev_user_shell --user_shell_args=--root_module=/tmp/tests/parent_child/parent_module

or even more generally:

@ bootstrap device_runner --user_shell=dev_user_shell --user_shell_args=--root_module=file:///tmp/tests/parent_child/parent_module

See also the bootstrap documentation.


Testing support is currently under development. Please use our example as an integration test and wait for it to complete.

$ @ bootstrap device_runner --user_shell=dummy_user_shell
[00091.616] 03539.03566> [INFO:../../apps/modular/src/user_runner/] DummyUserShell DELETE STORY DONE
[00091.616] 03071.03110> [INFO:../../apps/modular/src/user_runner/] UserRunner::Terminate: Terminating UserRunner.
[00091.621] 02886.02905> [INFO:../../apps/modular/src/device_runner/] User logged out. Starting shutdown.
[00091.622] 02794.02810> [INFO:../../apps/modular/src/device_runner/] Shutting down DeviceRunner..