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

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

Issue 14238023: [Android] Use CONFIGURATION_NAME-specific device folders (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | « no previous file | build/java_apk.gypi » ('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 23 matching lines...) Expand all
34 host_path = os.path.join(options.libraries_dir, lib) 34 host_path = os.path.join(options.libraries_dir, lib)
35 35
36 def Push(): 36 def Push():
37 if needs_directory: 37 if needs_directory:
38 adb.RunShellCommand('mkdir ' + options.device_dir) 38 adb.RunShellCommand('mkdir ' + options.device_dir)
39 needs_directory[:] = [] # = False 39 needs_directory[:] = [] # = False
40 adb.PushIfNeeded(host_path, device_path) 40 adb.PushIfNeeded(host_path, device_path)
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, record_path=record_path, input_paths=[host_path]) 44 Push,
45 record_path=record_path,
46 input_paths=[host_path],
47 input_strings=[device_path])
45 48
46 49
47 def main(argv): 50 def main(argv):
48 parser = optparse.OptionParser() 51 parser = optparse.OptionParser()
49 parser.add_option('--libraries-dir', 52 parser.add_option('--libraries-dir',
50 help='Directory that contains stripped libraries.') 53 help='Directory that contains stripped libraries.')
51 parser.add_option('--device-dir', 54 parser.add_option('--device-dir',
52 help='Device directory to push the libraries to.') 55 help='Device directory to push the libraries to.')
53 parser.add_option('--libraries-json', 56 parser.add_option('--libraries-json',
54 help='Path to the json list of native libraries.') 57 help='Path to the json list of native libraries.')
55 parser.add_option('--stamp', help='Path to touch on success.') 58 parser.add_option('--stamp', help='Path to touch on success.')
56 options, _ = parser.parse_args() 59 options, _ = parser.parse_args()
57 60
58 required_options = ['libraries_dir', 'device_dir', 'libraries_json'] 61 required_options = ['libraries_dir', 'device_dir', 'libraries_json']
59 build_utils.CheckOptions(options, parser, required=required_options) 62 build_utils.CheckOptions(options, parser, required=required_options)
60 63
61 DoPush(options) 64 DoPush(options)
62 65
63 if options.stamp: 66 if options.stamp:
64 build_utils.Touch(options.stamp) 67 build_utils.Touch(options.stamp)
65 68
66 69
67 if __name__ == '__main__': 70 if __name__ == '__main__':
68 sys.exit(main(sys.argv)) 71 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | build/java_apk.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698