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

Side by Side Diff: build/android/incremental_install/installer.py

Issue 1415413005: Revert of [Android] Add a configurable environment for devil/. (RELAND) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months 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
« no previous file with comments | « build/android/gyp/util/build_device.py ('k') | build/android/provision_devices.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2015 The Chromium Authors. All rights reserved. 3 # Copyright 2015 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """Install *_incremental.apk targets as well as their dependent files.""" 7 """Install *_incremental.apk targets as well as their dependent files."""
8 8
9 import argparse 9 import argparse
10 import glob 10 import glob
11 import logging 11 import logging
12 import os 12 import os
13 import posixpath 13 import posixpath
14 import shutil 14 import shutil
15 import sys 15 import sys
16 16
17 sys.path.append( 17 sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir))
18 os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)))
19 import devil_chromium
20 from devil.android import apk_helper 18 from devil.android import apk_helper
21 from devil.android import device_utils 19 from devil.android import device_utils
22 from devil.android import device_errors 20 from devil.android import device_errors
23 from devil.android.sdk import version_codes 21 from devil.android.sdk import version_codes
24 from devil.utils import reraiser_thread 22 from devil.utils import reraiser_thread
25 from pylib import constants 23 from pylib import constants
26 from pylib.utils import run_tests_helper 24 from pylib.utils import run_tests_helper
27 from pylib.utils import time_profile 25 from pylib.utils import time_profile
28 26
29 prev_sys_path = list(sys.path) 27 prev_sys_path = list(sys.path)
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 action='count', 225 action='count',
228 help='Verbose level (multiple times for more)') 226 help='Verbose level (multiple times for more)')
229 227
230 args = parser.parse_args() 228 args = parser.parse_args()
231 229
232 run_tests_helper.SetLogLevel(args.verbose_count) 230 run_tests_helper.SetLogLevel(args.verbose_count)
233 constants.SetBuildType('Debug') 231 constants.SetBuildType('Debug')
234 if args.output_directory: 232 if args.output_directory:
235 constants.SetOutputDirectory(args.output_directory) 233 constants.SetOutputDirectory(args.output_directory)
236 234
237 devil_chromium.Initialize(output_directory=constants.GetOutputDirectory())
238
239 if args.device: 235 if args.device:
240 # Retries are annoying when commands fail for legitimate reasons. Might want 236 # Retries are annoying when commands fail for legitimate reasons. Might want
241 # to enable them if this is ever used on bots though. 237 # to enable them if this is ever used on bots though.
242 device = device_utils.DeviceUtils( 238 device = device_utils.DeviceUtils(
243 args.device, default_retries=0, enable_device_files_cache=True) 239 args.device, default_retries=0, enable_device_files_cache=True)
244 else: 240 else:
245 devices = device_utils.DeviceUtils.HealthyDevices( 241 devices = device_utils.DeviceUtils.HealthyDevices(
246 default_retries=0, enable_device_files_cache=True) 242 default_retries=0, enable_device_files_cache=True)
247 if not devices: 243 if not devices:
248 raise device_errors.NoDevicesError() 244 raise device_errors.NoDevicesError()
(...skipping 13 matching lines...) Expand all
262 if args.uninstall: 258 if args.uninstall:
263 Uninstall(device, apk.GetPackageName()) 259 Uninstall(device, apk.GetPackageName())
264 else: 260 else:
265 Install(device, apk, split_globs=args.splits, lib_dir=args.lib_dir, 261 Install(device, apk, split_globs=args.splits, lib_dir=args.lib_dir,
266 dex_files=args.dex_files, enable_device_cache=args.cache, 262 dex_files=args.dex_files, enable_device_cache=args.cache,
267 use_concurrency=args.threading) 263 use_concurrency=args.threading)
268 264
269 265
270 if __name__ == '__main__': 266 if __name__ == '__main__':
271 sys.exit(main()) 267 sys.exit(main())
OLDNEW
« no previous file with comments | « build/android/gyp/util/build_device.py ('k') | build/android/provision_devices.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698