Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3920)

Unified Diff: build/android/devil/android/sdk/aapt.py

Issue 1316413003: [Android] Add a configurable environment for devil/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/devil/android/md5sum_test.py ('k') | build/android/devil/android/sdk/adb_wrapper.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/devil/android/sdk/aapt.py
diff --git a/build/android/devil/android/sdk/aapt.py b/build/android/devil/android/sdk/aapt.py
index 1c051e0c55fbe3f232891ef1ecc26d26fcbe892f..c2efb50f682cec27a0be774304003747665741b4 100644
--- a/build/android/devil/android/sdk/aapt.py
+++ b/build/android/devil/android/sdk/aapt.py
@@ -6,10 +6,9 @@
import os
+from devil import devil_env
from devil.utils import cmd_helper
-from pylib import constants
-_AAPT_PATH = os.path.join(constants.ANDROID_SDK_TOOLS, 'aapt')
def _RunAaptCmd(args):
"""Runs an aapt command.
@@ -20,13 +19,16 @@ def _RunAaptCmd(args):
Returns:
The output of the command.
"""
- cmd = [_AAPT_PATH] + args
+ aapt_path = os.path.join(
+ devil_env.config.android_sdk_build_tools_path, 'aapt')
+ cmd = [aapt_path] + args
status, output = cmd_helper.GetCmdStatusAndOutput(cmd)
if status != 0:
raise Exception('Failed running aapt command: "%s" with output "%s".' %
(' '.join(cmd), output))
return output
+
def Dump(what, apk, assets=None):
"""Returns the output of the aapt dump command.
« no previous file with comments | « build/android/devil/android/md5sum_test.py ('k') | build/android/devil/android/sdk/adb_wrapper.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698