diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2016-01-05 01:22:53 +0530 |
---|---|---|
committer | bors-servo <lbergstrom+bors@mozilla.com> | 2016-01-05 01:22:53 +0530 |
commit | ea4206e36259cd464480fed3ca9ac6857568bd7c (patch) | |
tree | b0decd11f61b323359df50d16ff8595a72a9e07f /python/servo/post_build_commands.py | |
parent | f3075d13191df9b9c7858b324122872d057fbe4d (diff) | |
parent | b9fc84ddccdb789e65326f3f196e1b7253039db6 (diff) | |
download | servo-ea4206e36259cd464480fed3ca9ac6857568bd7c.tar.gz servo-ea4206e36259cd464480fed3ca9ac6857568bd7c.zip |
Auto merge of #9150 - mbrubeck:run-android, r=larsbergstrom
Make "mach run" use --android by default when enabled in .servobuild
When `.servobuild` has `android = true`, the `mach run` command should default to running on Android.
r? @larsbergstrom
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9150)
<!-- Reviewable:end -->
Diffstat (limited to 'python/servo/post_build_commands.py')
-rw-r--r-- | python/servo/post_build_commands.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py index a119f2a2712..8c0df293b9c 100644 --- a/python/servo/post_build_commands.py +++ b/python/servo/post_build_commands.py @@ -41,7 +41,7 @@ class PostBuildCommands(CommandBase): help='Run the release build') @CommandArgument('--dev', '-d', action='store_true', help='Run the dev build') - @CommandArgument('--android', action='store_true', + @CommandArgument('--android', action='store_true', default=None, help='Run on an Android device through `adb shell`') @CommandArgument('--debug', action='store_true', help='Enable the debugger. Not specifying a ' @@ -53,10 +53,13 @@ class PostBuildCommands(CommandBase): @CommandArgument( 'params', nargs='...', help="Command-line arguments to be passed through to Servo") - def run(self, params, release=False, dev=False, android=False, debug=False, debugger=None): + def run(self, params, release=False, dev=False, android=None, debug=False, debugger=None): env = self.build_env() env["RUST_BACKTRACE"] = "1" + if android is None: + android = self.config["build"]["android"] + if android: if debug: print("Android on-device debugging is not supported by mach yet. See") |