OLD | NEW |
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 | |
13 import posixpath | 12 import posixpath |
14 import sys | 13 import sys |
15 import time | 14 import time |
16 | 15 |
17 from devil.android import apk_helper | 16 from devil.android import apk_helper |
18 from devil.android import device_utils | 17 from devil.android import device_utils |
19 from devil.android import device_errors | 18 from devil.android import device_errors |
20 from devil.utils import reraiser_thread | 19 from devil.utils import reraiser_thread |
21 from pylib import constants | 20 from pylib import constants |
22 | 21 |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 device.PushChangedFiles([(args.lib_dir, device_lib_dir)], | 99 device.PushChangedFiles([(args.lib_dir, device_lib_dir)], |
101 delete_device_stale=True) | 100 delete_device_stale=True) |
102 # Concurrency here speeds things up quite a bit, but DeviceUtils hasn't | 101 # Concurrency here speeds things up quite a bit, but DeviceUtils hasn't |
103 # been designed for multi-threading. Enabling only because this is a | 102 # been designed for multi-threading. Enabling only because this is a |
104 # developer-only tool. | 103 # developer-only tool. |
105 if args.no_threading: | 104 if args.no_threading: |
106 do_install() | 105 do_install() |
107 do_push_libs() | 106 do_push_libs() |
108 else: | 107 else: |
109 reraiser_thread.RunAsync((do_install, do_push_libs)) | 108 reraiser_thread.RunAsync((do_install, do_push_libs)) |
110 logging.info('Took %s seconds' % round(time.time() - start_time, 1)) | 109 logging.info('Took %s seconds', round(time.time() - start_time, 1)) |
111 | 110 |
112 | 111 |
113 if __name__ == '__main__': | 112 if __name__ == '__main__': |
114 sys.exit(main()) | 113 sys.exit(main()) |
115 | 114 |
OLD | NEW |