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

Side by Side Diff: build/android/gyp/push_libraries.py

Issue 13877025: [Android] With gyp_managed_install no device is only a warning (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « build/android/gyp/create_device_library_links.py ('k') | build/android/gyp/util/build_utils.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 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 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 """Pushes native libraries to a device. 7 """Pushes native libraries to a device.
8 8
9 """ 9 """
10 10
(...skipping 30 matching lines...) Expand all
41 41
42 record_path = '%s.%s.push.md5.stamp' % (host_path, serial_number) 42 record_path = '%s.%s.push.md5.stamp' % (host_path, serial_number)
43 md5_check.CallAndRecordIfStale( 43 md5_check.CallAndRecordIfStale(
44 Push, 44 Push,
45 record_path=record_path, 45 record_path=record_path,
46 input_paths=[host_path], 46 input_paths=[host_path],
47 input_strings=[device_path]) 47 input_strings=[device_path])
48 48
49 49
50 def main(argv): 50 def main(argv):
51 if not build_utils.IsDeviceReady():
52 build_utils.PrintBigWarning(
53 'Zero (or multiple) devices attached. Skipping native library push.')
54 return
55
51 parser = optparse.OptionParser() 56 parser = optparse.OptionParser()
52 parser.add_option('--libraries-dir', 57 parser.add_option('--libraries-dir',
53 help='Directory that contains stripped libraries.') 58 help='Directory that contains stripped libraries.')
54 parser.add_option('--device-dir', 59 parser.add_option('--device-dir',
55 help='Device directory to push the libraries to.') 60 help='Device directory to push the libraries to.')
56 parser.add_option('--libraries-json', 61 parser.add_option('--libraries-json',
57 help='Path to the json list of native libraries.') 62 help='Path to the json list of native libraries.')
58 parser.add_option('--stamp', help='Path to touch on success.') 63 parser.add_option('--stamp', help='Path to touch on success.')
59 options, _ = parser.parse_args() 64 options, _ = parser.parse_args()
60 65
61 required_options = ['libraries_dir', 'device_dir', 'libraries_json'] 66 required_options = ['libraries_dir', 'device_dir', 'libraries_json']
62 build_utils.CheckOptions(options, parser, required=required_options) 67 build_utils.CheckOptions(options, parser, required=required_options)
63 68
64 DoPush(options) 69 DoPush(options)
65 70
66 if options.stamp: 71 if options.stamp:
67 build_utils.Touch(options.stamp) 72 build_utils.Touch(options.stamp)
68 73
69 74
70 if __name__ == '__main__': 75 if __name__ == '__main__':
71 sys.exit(main(sys.argv)) 76 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « build/android/gyp/create_device_library_links.py ('k') | build/android/gyp/util/build_utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698