New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mach bootstrap-android and test-android-startup commands #21094
Changes from 1 commit
b9d5f11
510cf1a
56df7f4
244a332
1ee54ab
8889742
fe24816
4cbf3de
eab971c
90ba22b
89f6c6d
7e7316e
1f8d04b
6e68705
484eee8
3c992af
7d7f202
b7a8b81
f4d740f
e54ad77
0e2e9cb
aa1c3ce
65122b1
fc77db4
b6b9fe0
9e544c2
8293b29
bee3fd0
eecbe83
c0d1b8e
File filter...
Jump to…
mach {package,install} --android: add --emulator and --usb
- Loading branch information
| @@ -389,10 +389,16 @@ def package(self, release=False, dev=False, android=None, debug=False, debugger= | ||
| @CommandArgument('--android', | ||
| action='store_true', | ||
| help='Install on Android') | ||
| @CommandArgument('--emulator', | ||
| action='store_true', | ||
| help='For Android, intall to the only emulated device') | ||
| @CommandArgument('--usb', | ||
| action='store_true', | ||
| help='For Android, intall to the only USB device') | ||
| @CommandArgument('--target', '-t', | ||
| default=None, | ||
| help='Install the given target platform') | ||
| def install(self, release=False, dev=False, android=False, target=None): | ||
| def install(self, release=False, dev=False, android=False, emulator=False, usb=False, target=None): | ||
| env = self.build_env() | ||
| if target and android: | ||
| print("Please specify either --target or --android.") | ||
| @@ -416,7 +422,15 @@ def install(self, release=False, dev=False, android=False, target=None): | ||
|
|
||
| if android: | ||
| pkg_path = binary_path + ".apk" | ||
| exec_command = [self.android_adb_path(env), "install", "-r", pkg_path] | ||
| exec_command = [self.android_adb_path(env)] | ||
| if emulator and usb: | ||
| print("Cannot install to both emulator and USB at the same time.") | ||
| return 1 | ||
| if emulator: | ||
| exec_command += ["-e"] | ||
SimonSapin
Author
Member
|
||
| if usb: | ||
| exec_command += ["-d"] | ||
| exec_command += ["install", "-r", pkg_path] | ||
| elif is_windows(): | ||
| pkg_path = path.join(path.dirname(binary_path), 'msi', 'Servo.msi') | ||
| exec_command = ["msiexec", "/i", pkg_path] | ||
Do we need a helper to start the emulator? We installed it. We push and run to the emulator. Maybe we should also start it somehow? Or test if it's running, and if not, check if the toolchain is present and print the command to run it.