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

Unified Diff: build/android/devil/android/install_commands.py

Issue 1517143002: [Android] Move install_commands to devil/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: --no-find-copies 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/device_utils.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/install_commands.py
diff --git a/build/android/pylib/device/commands/install_commands.py b/build/android/devil/android/install_commands.py
similarity index 80%
rename from build/android/pylib/device/commands/install_commands.py
rename to build/android/devil/android/install_commands.py
index fde606f12dc365193b89d2ebcce130c01d7a69e0..ae385f1c9f700ae2ad643c101b0c6f62361bb3f9 100644
--- a/build/android/pylib/device/commands/install_commands.py
+++ b/build/android/devil/android/install_commands.py
@@ -5,11 +5,12 @@
import os
import posixpath
+from devil import devil_env
from devil.android import device_errors
-from pylib import constants
+from devil.android.constants import android_file_system
-BIN_DIR = '%s/bin' % constants.TEST_EXECUTABLE_DIR
-_FRAMEWORK_DIR = '%s/framework' % constants.TEST_EXECUTABLE_DIR
+BIN_DIR = '%s/bin' % android_file_system.TEST_EXECUTABLE_DIR
+_FRAMEWORK_DIR = '%s/framework' % android_file_system.TEST_EXECUTABLE_DIR
_COMMANDS = {
'unzip': 'org.chromium.android.commands.unzip.Unzip',
@@ -35,9 +36,7 @@ def InstallCommands(device):
'chromium_commands currently requires a userdebug build.',
device_serial=device.adb.GetDeviceSerial())
- chromium_commands_jar_path = os.path.join(
- constants.GetOutDirectory(), constants.SDK_BUILD_JAVALIB_DIR,
- 'chromium_commands.dex.jar')
+ chromium_commands_jar_path = devil_env.config.FetchPath('chromium_commands')
rnephew (Wrong account) 2015/12/11 05:13:25 I'm going to have to look into how the magic of th
if not os.path.exists(chromium_commands_jar_path):
raise device_errors.CommandFailedError(
'%s not found. Please build chromium_commands.'
@@ -46,7 +45,7 @@ def InstallCommands(device):
device.RunShellCommand(['mkdir', BIN_DIR, _FRAMEWORK_DIR])
for command, main_class in _COMMANDS.iteritems():
shell_command = _SHELL_COMMAND_FORMAT % (
- constants.TEST_EXECUTABLE_DIR, main_class)
+ android_file_system.TEST_EXECUTABLE_DIR, main_class)
shell_file = '%s/%s' % (BIN_DIR, command)
device.WriteFile(shell_file, shell_command)
device.RunShellCommand(
« no previous file with comments | « build/android/devil/android/device_utils.py ('k') | build/android/devil/devil_dependencies.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698