aboutsummaryrefslogtreecommitdiffstats
path: root/python/servo/command_base.py
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2018-06-19 16:37:16 -0400
committerGitHub <noreply@github.com>2018-06-19 16:37:16 -0400
commitc2d3f2a40f8a3d20b1e669061dc2744dc9fbbab3 (patch)
treeefd0165f19d1c8d17476fa3da01c22bdd0190bbb /python/servo/command_base.py
parent0226a1a4add1bc2b79a0bdba1f725e00ce854937 (diff)
parenta631cb6b475b18e77bd6ca9db7ffe2cd94c3bde7 (diff)
downloadservo-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/command_base.py')
-rw-r--r--python/servo/command_base.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/python/servo/command_base.py b/python/servo/command_base.py
index 9387535ec81..8e7a9f4b2dc 100644
--- a/python/servo/command_base.py
+++ b/python/servo/command_base.py
@@ -606,6 +606,13 @@ class CommandBase(object):
def android_aar_dir(self):
return path.join(self.context.topdir, "target", "android_aar")
+ def android_adb_path(self, env):
+ if "ANDROID_SDK" in env:
+ sdk_adb = path.join(env["ANDROID_SDK"], "platform-tools", "adb")
+ if path.exists(sdk_adb):
+ return sdk_adb
+ return "adb"
+
def handle_android_target(self, target):
if target == "arm-linux-androideabi":
self.config["android"]["platform"] = "android-18"