aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/post_build_commands.py
diff options
context:
space:
mode:
authorSimon Sapin <simon.sapin@exyr.org>2018-06-28 16:40:07 +0200
committerSimon Sapin <simon.sapin@exyr.org>2018-07-02 13:25:44 +0200
commitb6b9fe07e2ff55b5bee31e7a9b0a85d31390a762 (patch)
tree9cc16370a68b3c1a362a91fcd6574567d8ba18bb /python/servo/post_build_commands.py
parentfc77db4b09ebd7eae69089f1dc1c95191a4a611a (diff)
downloadservo-b6b9fe07e2ff55b5bee31e7a9b0a85d31390a762.tar.gz
servo-b6b9fe07e2ff55b5bee31e7a9b0a85d31390a762.zip
Add "./mach android-emulator"
Diffstat (limited to 'python/servo/post_build_commands.py')
-rw-r--r--python/servo/post_build_commands.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/python/servo/post_build_commands.py b/python/servo/post_build_commands.py
index f99de244e78..b5dd211a144 100644
--- a/python/servo/post_build_commands.py
+++ b/python/servo/post_build_commands.py
@@ -169,6 +169,20 @@ class PostBuildCommands(CommandBase):
else:
raise e
+ @Command('android-emulator',
+ description='Run the Android emulator',
+ category='post-build')
+ @CommandArgument(
+ 'args', nargs='...',
+ help="Command-line arguments to be passed through to the emulator")
+ def android_emulator(self, args=None):
+ if not args:
+ print("Pass at least an AVD name such as @servo-arm or @servo-x86")
+ return 1
+ env = self.build_env()
+ emulator = path.join(env["ANDROID_SDK"], "emulator", "emulator")
+ check_call([emulator] + args)
+
@Command('rr-record',
description='Run Servo whilst recording execution with rr',
category='post-build')