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

Side by Side Diff: build/android/adb_install_apk.py

Issue 1315743004: [Android] Add a custom pylintrc for build/android/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix appurify_sanitized import-errors Created 5 years, 3 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/PRESUBMIT.py ('k') | build/android/adb_reverse_forwarder.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 (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 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 """Utility script to install APKs from the command line quickly.""" 7 """Utility script to install APKs from the command line quickly."""
8 8
9 import argparse 9 import argparse
10 import glob 10 import glob
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 apk = os.path.join(constants.GetOutDirectory(), 'apks', apk) 69 apk = os.path.join(constants.GetOutDirectory(), 'apks', apk)
70 if not os.path.exists(apk): 70 if not os.path.exists(apk):
71 parser.error('%s not found.' % apk) 71 parser.error('%s not found.' % apk)
72 72
73 if args.splits: 73 if args.splits:
74 splits = [] 74 splits = []
75 base_apk_package = apk_helper.ApkHelper(apk).GetPackageName() 75 base_apk_package = apk_helper.ApkHelper(apk).GetPackageName()
76 for split_glob in args.splits: 76 for split_glob in args.splits:
77 apks = [f for f in glob.glob(split_glob) if f.endswith('.apk')] 77 apks = [f for f in glob.glob(split_glob) if f.endswith('.apk')]
78 if not apks: 78 if not apks:
79 logging.warning('No apks matched for %s.' % split_glob) 79 logging.warning('No apks matched for %s.', split_glob)
80 for f in apks: 80 for f in apks:
81 helper = apk_helper.ApkHelper(f) 81 helper = apk_helper.ApkHelper(f)
82 if (helper.GetPackageName() == base_apk_package 82 if (helper.GetPackageName() == base_apk_package
83 and helper.GetSplitName()): 83 and helper.GetSplitName()):
84 splits.append(f) 84 splits.append(f)
85 85
86 if args.blacklist_file: 86 if args.blacklist_file:
87 blacklist = device_blacklist.Blacklist(args.blacklist_file) 87 blacklist = device_blacklist.Blacklist(args.blacklist_file)
88 else: 88 else:
89 # TODO(jbudorick): Remove this once the bots are converted. 89 # TODO(jbudorick): Remove this once the bots are converted.
(...skipping 24 matching lines...) Expand all
114 if blacklist: 114 if blacklist:
115 blacklist.Extend([str(device)]) 115 blacklist.Extend([str(device)])
116 logging.warning('Blacklisting %s', str(device)) 116 logging.warning('Blacklisting %s', str(device))
117 117
118 device_utils.DeviceUtils.parallel(devices).pMap(blacklisting_install) 118 device_utils.DeviceUtils.parallel(devices).pMap(blacklisting_install)
119 119
120 120
121 if __name__ == '__main__': 121 if __name__ == '__main__':
122 sys.exit(main()) 122 sys.exit(main())
123 123
OLDNEW
« no previous file with comments | « build/android/PRESUBMIT.py ('k') | build/android/adb_reverse_forwarder.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698