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

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

Issue 1416703003: [Android] Add a configurable environment for devil/. (RELAND 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years 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/sdk/shared_prefs_test.py ('k') | build/android/devil/devil_dependencies.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/devil/android/sdk/split_select.py
diff --git a/build/android/devil/android/sdk/split_select.py b/build/android/devil/android/sdk/split_select.py
index 47fcea3cea616c9cdad4d593489e3e3c612be011..b47a21f9fe00b59b10b0ead9297d330691b900c2 100644
--- a/build/android/devil/android/sdk/split_select.py
+++ b/build/android/devil/android/sdk/split_select.py
@@ -4,12 +4,14 @@
"""This module wraps Android's split-select tool."""
-import os
-
+from devil.android.sdk import build_tools
from devil.utils import cmd_helper
-from pylib import constants
+from devil.utils import lazy
+
+
+_split_select_path = lazy.WeakConstant(
+ lambda: build_tools.GetPath('split-select'))
-_SPLIT_SELECT_PATH = os.path.join(constants.ANDROID_SDK_TOOLS, 'split-select')
def _RunSplitSelectCmd(args):
"""Runs a split-select command.
@@ -20,7 +22,7 @@ def _RunSplitSelectCmd(args):
Returns:
The output of the command.
"""
- cmd = [_SPLIT_SELECT_PATH] + args
+ cmd = [_split_select_path.read()] + args
status, output = cmd_helper.GetCmdStatusAndOutput(cmd)
if status != 0:
raise Exception('Failed running command "%s" with output "%s".' %
« no previous file with comments | « build/android/devil/android/sdk/shared_prefs_test.py ('k') | build/android/devil/devil_dependencies.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698