diff options
author | bors-servo <lbergstrom+bors@mozilla.com> | 2018-06-19 16:37:16 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-19 16:37:16 -0400 |
commit | c2d3f2a40f8a3d20b1e669061dc2744dc9fbbab3 (patch) | |
tree | efd0165f19d1c8d17476fa3da01c22bdd0190bbb /python/servo/package_commands.py | |
parent | 0226a1a4add1bc2b79a0bdba1f725e00ce854937 (diff) | |
parent | a631cb6b475b18e77bd6ca9db7ffe2cd94c3bde7 (diff) | |
download | servo-c2d3f2a40f8a3d20b1e669061dc2744dc9fbbab3.tar.gz servo-c2d3f2a40f8a3d20b1e669061dc2744dc9fbbab3.zip |
Auto merge of #20421 - talklittle:issue-20219, r=jdm
mach: android install/run: infer adb path from SDK dir
<!-- Please describe your changes on the following line: -->
Infer Android `adb` path from SDK directory in environment variables.
---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `__` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #20219 (github issue number if applicable).
<!-- Either: -->
- [ ] There are tests for these changes OR
- [x] These changes do not require tests because it is a build script change
<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->
<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/20421)
<!-- Reviewable:end -->
Diffstat (limited to 'python/servo/package_commands.py')
-rw-r--r-- | python/servo/package_commands.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/python/servo/package_commands.py b/python/servo/package_commands.py index c2820b114b5..5f0e3494279 100644 --- a/python/servo/package_commands.py +++ b/python/servo/package_commands.py @@ -393,6 +393,7 @@ class PackageCommands(CommandBase): default=None, help='Install the given target platform') def install(self, release=False, dev=False, android=False, target=None): + env = self.build_env() if target and android: print("Please specify either --target or --android.") sys.exit(1) @@ -415,7 +416,7 @@ class PackageCommands(CommandBase): if android: pkg_path = binary_path + ".apk" - exec_command = ["adb", "install", "-r", pkg_path] + exec_command = [self.android_adb_path(env), "install", "-r", pkg_path] elif is_windows(): pkg_path = path.join(path.dirname(binary_path), 'msi', 'Servo.msi') exec_command = ["msiexec", "/i", pkg_path] @@ -428,7 +429,7 @@ class PackageCommands(CommandBase): return result print(" ".join(exec_command)) - return subprocess.call(exec_command, env=self.build_env()) + return subprocess.call(exec_command, env=env) @Command('upload-nightly', description='Upload Servo nightly to S3', |