mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Add "./mach android-emulator"
This commit is contained in:
parent
fc77db4b09
commit
b6b9fe07e2
2 changed files with 15 additions and 1 deletions
|
@ -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"),
|
||||
]
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue