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

Side by Side Diff: build/android/pylib/device/commands/install_commands.py

Issue 754433003: Update from https://crrev.com/305340 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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 unified diff | Download patch
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 6
7 from pylib import constants 7 from pylib import constants
8 8
9 BIN_DIR = '%s/bin' % constants.TEST_EXECUTABLE_DIR 9 BIN_DIR = '%s/bin' % constants.TEST_EXECUTABLE_DIR
10 _FRAMEWORK_DIR = '%s/framework' % constants.TEST_EXECUTABLE_DIR 10 _FRAMEWORK_DIR = '%s/framework' % constants.TEST_EXECUTABLE_DIR
(...skipping 23 matching lines...) Expand all
34 'chromium_commands.dex.jar') 34 'chromium_commands.dex.jar')
35 if not os.path.exists(chromium_commands_jar_path): 35 if not os.path.exists(chromium_commands_jar_path):
36 raise Exception('%s not found. Please build chromium_commands.' 36 raise Exception('%s not found. Please build chromium_commands.'
37 % chromium_commands_jar_path) 37 % chromium_commands_jar_path)
38 38
39 device.RunShellCommand(['mkdir', BIN_DIR, _FRAMEWORK_DIR]) 39 device.RunShellCommand(['mkdir', BIN_DIR, _FRAMEWORK_DIR])
40 for command, main_class in _COMMANDS.iteritems(): 40 for command, main_class in _COMMANDS.iteritems():
41 shell_command = _SHELL_COMMAND_FORMAT % ( 41 shell_command = _SHELL_COMMAND_FORMAT % (
42 constants.TEST_EXECUTABLE_DIR, main_class) 42 constants.TEST_EXECUTABLE_DIR, main_class)
43 shell_file = '%s/%s' % (BIN_DIR, command) 43 shell_file = '%s/%s' % (BIN_DIR, command)
44 device.WriteTextFile(shell_file, shell_command) 44 device.WriteFile(shell_file, shell_command)
45 device.RunShellCommand( 45 device.RunShellCommand(
46 ['chmod', '755', shell_file], check_return=True) 46 ['chmod', '755', shell_file], check_return=True)
47 47
48 device.adb.Push( 48 device.adb.Push(
49 chromium_commands_jar_path, 49 chromium_commands_jar_path,
50 '%s/chromium_commands.jar' % _FRAMEWORK_DIR) 50 '%s/chromium_commands.jar' % _FRAMEWORK_DIR)
51 51
OLDNEW
« no previous file with comments | « build/android/pylib/device/adb_wrapper.py ('k') | build/android/pylib/device/decorators_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698