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

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

Issue 1337953002: Make generated bin/install_incremental_* script remember its own CHROMIUM_OUTPUT_DIR (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: delete os.environ() line that was already supposed to be deleted. 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/gn/create_incremental_install_script.py ('k') | 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 21 matching lines...) Expand all
32 help='A glob matching the apk splits. ' 32 help='A glob matching the apk splits. '
33 'Can be specified multiple times.') 33 'Can be specified multiple times.')
34 parser.add_argument('--lib-dir', 34 parser.add_argument('--lib-dir',
35 help='Path to native libraries directory.') 35 help='Path to native libraries directory.')
36 parser.add_argument('-d', '--device', dest='device', 36 parser.add_argument('-d', '--device', dest='device',
37 help='Target device for apk to install on.') 37 help='Target device for apk to install on.')
38 parser.add_argument('--uninstall', 38 parser.add_argument('--uninstall',
39 action='store_true', 39 action='store_true',
40 default=False, 40 default=False,
41 help='Remove the app and all side-loaded files.') 41 help='Remove the app and all side-loaded files.')
42 parser.add_argument('--output-directory',
43 help='Path to the root build directory.')
42 parser.add_argument('--no-threading', 44 parser.add_argument('--no-threading',
43 action='store_true', 45 action='store_true',
44 default=False, 46 default=False,
45 help='Do not install and push concurrently') 47 help='Do not install and push concurrently')
46 parser.add_argument('-v', 48 parser.add_argument('-v',
47 '--verbose', 49 '--verbose',
48 dest='verbose_count', 50 dest='verbose_count',
49 default=0, 51 default=0,
50 action='count', 52 action='count',
51 help='Verbose level (multiple times for more)') 53 help='Verbose level (multiple times for more)')
52 54
53 args = parser.parse_args() 55 args = parser.parse_args()
54 56
55 logging.basicConfig(format='%(asctime)s (%(thread)d) %(message)s') 57 logging.basicConfig(format='%(asctime)s (%(thread)d) %(message)s')
56 run_tests_helper.SetLogLevel(args.verbose_count) 58 run_tests_helper.SetLogLevel(args.verbose_count)
57 constants.SetBuildType('Debug') 59 constants.SetBuildType('Debug')
60 if args.output_directory:
61 constants.SetOutputDirectory(args.output_directory)
58 62
59 if args.device: 63 if args.device:
60 # Retries are annoying when commands fail for legitimate reasons. Might want 64 # Retries are annoying when commands fail for legitimate reasons. Might want
61 # to enable them if this is ever used on bots though. 65 # to enable them if this is ever used on bots though.
62 device = device_utils.DeviceUtils(args.device, default_retries=0) 66 device = device_utils.DeviceUtils(args.device, default_retries=0)
63 else: 67 else:
64 devices = device_utils.DeviceUtils.HealthyDevices(default_retries=0) 68 devices = device_utils.DeviceUtils.HealthyDevices(default_retries=0)
65 if not devices: 69 if not devices:
66 raise device_errors.NoDevicesError() 70 raise device_errors.NoDevicesError()
67 elif len(devices) == 1: 71 elif len(devices) == 1:
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 do_install() 118 do_install()
115 do_push_libs() 119 do_push_libs()
116 else: 120 else:
117 reraiser_thread.RunAsync((do_install, do_push_libs)) 121 reraiser_thread.RunAsync((do_install, do_push_libs))
118 logging.info('Took %s seconds', round(time.time() - start_time, 1)) 122 logging.info('Took %s seconds', round(time.time() - start_time, 1))
119 123
120 124
121 if __name__ == '__main__': 125 if __name__ == '__main__':
122 sys.exit(main()) 126 sys.exit(main())
123 127
OLDNEW
« no previous file with comments | « build/android/gn/create_incremental_install_script.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698