From b6b9fe07e2ff55b5bee31e7a9b0a85d31390a762 Mon Sep 17 00:00:00 2001 From: Simon Sapin Date: Thu, 28 Jun 2018 16:40:07 +0200 Subject: [PATCH] Add "./mach android-emulator" --- python/servo/bootstrap_commands.py | 2 +- python/servo/post_build_commands.py | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/python/servo/bootstrap_commands.py b/python/servo/bootstrap_commands.py index 7fa91825a02..3cf7f36a0a7 100644 --- a/python/servo/bootstrap_commands.py +++ b/python/servo/bootstrap_commands.py @@ -69,7 +69,7 @@ class MachCommands(CommandBase): sdk_build_tools = "25.0.2" emulator_images = [ - ("servo-armv7", "25", "google_apis;armeabi-v7a"), + ("servo-arm", "25", "google_apis;armeabi-v7a"), ("servo-x86", "28", "google_apis;x86"), ] 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')