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

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

Issue 1502033002: Revert of [Android] Add a configurable environment for devil/. (RELAND 2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
248 action='count', 246 action='count',
249 help='Verbose level (multiple times for more)') 247 help='Verbose level (multiple times for more)')
250 248
251 args = parser.parse_args() 249 args = parser.parse_args()
252 250
253 run_tests_helper.SetLogLevel(args.verbose_count) 251 run_tests_helper.SetLogLevel(args.verbose_count)
254 constants.SetBuildType('Debug') 252 constants.SetBuildType('Debug')
255 if args.output_directory: 253 if args.output_directory:
256 constants.SetOutputDirectory(args.output_directory) 254 constants.SetOutputDirectory(args.output_directory)
257 255
258 devil_chromium.Initialize(output_directory=constants.GetOutputDirectory())
259
260 if args.device: 256 if args.device:
261 # Retries are annoying when commands fail for legitimate reasons. Might want 257 # Retries are annoying when commands fail for legitimate reasons. Might want
262 # to enable them if this is ever used on bots though. 258 # to enable them if this is ever used on bots though.
263 device = device_utils.DeviceUtils( 259 device = device_utils.DeviceUtils(
264 args.device, default_retries=0, enable_device_files_cache=True) 260 args.device, default_retries=0, enable_device_files_cache=True)
265 else: 261 else:
266 devices = device_utils.DeviceUtils.HealthyDevices( 262 devices = device_utils.DeviceUtils.HealthyDevices(
267 default_retries=0, enable_device_files_cache=True) 263 default_retries=0, enable_device_files_cache=True)
268 if not devices: 264 if not devices:
269 raise device_errors.NoDevicesError() 265 raise device_errors.NoDevicesError()
(...skipping 14 matching lines...) Expand all
284 Uninstall(device, apk.GetPackageName()) 280 Uninstall(device, apk.GetPackageName())
285 else: 281 else:
286 Install(device, apk, split_globs=args.splits, native_libs=args.native_libs, 282 Install(device, apk, split_globs=args.splits, native_libs=args.native_libs,
287 dex_files=args.dex_files, enable_device_cache=args.cache, 283 dex_files=args.dex_files, enable_device_cache=args.cache,
288 use_concurrency=args.threading, 284 use_concurrency=args.threading,
289 show_proguard_warning=args.show_proguard_warning) 285 show_proguard_warning=args.show_proguard_warning)
290 286
291 287
292 if __name__ == '__main__': 288 if __name__ == '__main__':
293 sys.exit(main()) 289 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