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

Unified Diff: build/android/pylib/device/commands/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 again 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/pylib/device/commands/__init__.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/pylib/device/commands/install_commands.py
diff --git a/build/android/pylib/device/commands/install_commands.py b/build/android/pylib/device/commands/install_commands.py
deleted file mode 100644
index fde606f12dc365193b89d2ebcce130c01d7a69e0..0000000000000000000000000000000000000000
--- a/build/android/pylib/device/commands/install_commands.py
+++ /dev/null
@@ -1,58 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-import os
-import posixpath
-
-from devil.android import device_errors
-from pylib import constants
-
-BIN_DIR = '%s/bin' % constants.TEST_EXECUTABLE_DIR
-_FRAMEWORK_DIR = '%s/framework' % constants.TEST_EXECUTABLE_DIR
-
-_COMMANDS = {
- 'unzip': 'org.chromium.android.commands.unzip.Unzip',
-}
-
-_SHELL_COMMAND_FORMAT = (
-"""#!/system/bin/sh
-base=%s
-export CLASSPATH=$base/framework/chromium_commands.jar
-exec app_process $base/bin %s $@
-""")
-
-
-def Installed(device):
- paths = [posixpath.join(BIN_DIR, c) for c in _COMMANDS]
- paths.append(posixpath.join(_FRAMEWORK_DIR, 'chromium_commands.jar'))
- return device.PathExists(paths)
-
-
-def InstallCommands(device):
- if device.IsUserBuild():
- raise device_errors.CommandFailedError(
- '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')
- if not os.path.exists(chromium_commands_jar_path):
- raise device_errors.CommandFailedError(
- '%s not found. Please build chromium_commands.'
- % chromium_commands_jar_path)
-
- 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)
- shell_file = '%s/%s' % (BIN_DIR, command)
- device.WriteFile(shell_file, shell_command)
- device.RunShellCommand(
- ['chmod', '755', shell_file], check_return=True)
-
- device.adb.Push(
- chromium_commands_jar_path,
- '%s/chromium_commands.jar' % _FRAMEWORK_DIR)
-
« no previous file with comments | « build/android/pylib/device/commands/__init__.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698