Chromium Code Reviews| 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( |