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

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

Issue 646523002: [Android] Add zip pushing and refine push mode selection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix findbugs issues. Created 6 years, 2 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/gyp/create_device_library_links.py ('k') | build/android/provision_devices.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 22 matching lines...) Expand all
33 # A list so that it is modifiable in Push below. 33 # A list so that it is modifiable in Push below.
34 needs_directory = [True] 34 needs_directory = [True]
35 for lib in libraries: 35 for lib in libraries:
36 device_path = os.path.join(options.device_dir, lib) 36 device_path = os.path.join(options.device_dir, lib)
37 host_path = os.path.join(options.libraries_dir, lib) 37 host_path = os.path.join(options.libraries_dir, lib)
38 38
39 def Push(): 39 def Push():
40 if needs_directory: 40 if needs_directory:
41 device.RunShellCommand('mkdir -p ' + options.device_dir) 41 device.RunShellCommand('mkdir -p ' + options.device_dir)
42 needs_directory[:] = [] # = False 42 needs_directory[:] = [] # = False
43 device.PushChangedFiles(host_path, device_path) 43 device.PushChangedFiles([(host_path, device_path)])
44 44
45 record_path = '%s.%s.push.md5.stamp' % (host_path, serial_number) 45 record_path = '%s.%s.push.md5.stamp' % (host_path, serial_number)
46 md5_check.CallAndRecordIfStale( 46 md5_check.CallAndRecordIfStale(
47 Push, 47 Push,
48 record_path=record_path, 48 record_path=record_path,
49 input_paths=[host_path], 49 input_paths=[host_path],
50 input_strings=[device_path]) 50 input_strings=[device_path])
51 51
52 52
53 def main(args): 53 def main(args):
(...skipping 17 matching lines...) Expand all
71 constants.SetBuildType(options.configuration_name) 71 constants.SetBuildType(options.configuration_name)
72 72
73 DoPush(options) 73 DoPush(options)
74 74
75 if options.stamp: 75 if options.stamp:
76 build_utils.Touch(options.stamp) 76 build_utils.Touch(options.stamp)
77 77
78 78
79 if __name__ == '__main__': 79 if __name__ == '__main__':
80 sys.exit(main(sys.argv[1:])) 80 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « build/android/gyp/create_device_library_links.py ('k') | build/android/provision_devices.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698