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

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

Issue 1326813003: Tweak logging in incremental_install.py to know when each part is done (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@device-more-caching
Patch Set: 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 | « no previous file | no next file » | 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
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 # Install .apk(s) if any of them have changed. 85 # Install .apk(s) if any of them have changed.
86 def do_install(): 86 def do_install():
87 if args.splits: 87 if args.splits:
88 splits = [] 88 splits = []
89 for split_glob in args.splits: 89 for split_glob in args.splits:
90 splits.extend((f for f in glob.glob(split_glob))) 90 splits.extend((f for f in glob.glob(split_glob)))
91 device.InstallSplitApk(args.apk_path, splits, reinstall=True, 91 device.InstallSplitApk(args.apk_path, splits, reinstall=True,
92 allow_cached_props=True) 92 allow_cached_props=True)
93 else: 93 else:
94 device.Install(args.apk_path, reinstall=True) 94 device.Install(args.apk_path, reinstall=True)
95 logging.info('Finished installing .apk')
jbudorick 2015/09/02 18:14:19 I know this feeling. I'd recommend using -v/--verb
agrieve 2015/09/02 18:34:04 Was planning on adding this, but does seem like a
95 96
96 # Push .so files to the device (if they have changed). 97 # Push .so files to the device (if they have changed).
97 def do_push_libs(): 98 def do_push_libs():
98 if args.lib_dir: 99 if args.lib_dir:
99 device_lib_dir = posixpath.join(device_incremental_dir, 'lib') 100 device_lib_dir = posixpath.join(device_incremental_dir, 'lib')
100 device.PushChangedFiles([(args.lib_dir, device_lib_dir)], 101 device.PushChangedFiles([(args.lib_dir, device_lib_dir)],
101 delete_device_stale=True) 102 delete_device_stale=True)
103 logging.info('Finished pushing native libs')
104
102 # Concurrency here speeds things up quite a bit, but DeviceUtils hasn't 105 # Concurrency here speeds things up quite a bit, but DeviceUtils hasn't
103 # been designed for multi-threading. Enabling only because this is a 106 # been designed for multi-threading. Enabling only because this is a
104 # developer-only tool. 107 # developer-only tool.
105 if args.no_threading: 108 if args.no_threading:
106 do_install() 109 do_install()
107 do_push_libs() 110 do_push_libs()
108 else: 111 else:
109 reraiser_thread.RunAsync((do_install, do_push_libs)) 112 reraiser_thread.RunAsync((do_install, do_push_libs))
110 logging.info('Took %s seconds' % round(time.time() - start_time, 1)) 113 logging.info('Took %s seconds' % round(time.time() - start_time, 1))
111 114
112 115
113 if __name__ == '__main__': 116 if __name__ == '__main__':
114 sys.exit(main()) 117 sys.exit(main())
115 118
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698