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

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

Issue 1571803002: [Android] Prepare build/android/ for catapult+devil. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@create-device-library-links
Patch Set: rebase Created 4 years, 11 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/jinja_template.py ('k') | build/android/gyp/util/build_device.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
11 import optparse 11 import optparse
12 import os 12 import os
13 import sys 13 import sys
14 14
15 from util import build_device
16 from util import build_utils
17 from util import md5_check
18
15 BUILD_ANDROID_DIR = os.path.abspath( 19 BUILD_ANDROID_DIR = os.path.abspath(
16 os.path.join(os.path.dirname(__file__), os.pardir)) 20 os.path.join(os.path.dirname(__file__), os.pardir))
17 sys.path.append(BUILD_ANDROID_DIR) 21 sys.path.append(BUILD_ANDROID_DIR)
18 22
23 import devil_chromium
19 from pylib import constants 24 from pylib import constants
20 25
21 from util import build_device
22 from util import build_utils
23 from util import md5_check
24
25 def DoPush(options): 26 def DoPush(options):
26 libraries = build_utils.ParseGypList(options.libraries) 27 libraries = build_utils.ParseGypList(options.libraries)
27 28
28 device = build_device.GetBuildDeviceFromPath( 29 device = build_device.GetBuildDeviceFromPath(
29 options.build_device_configuration) 30 options.build_device_configuration)
30 if not device: 31 if not device:
31 return 32 return
32 33
33 serial_number = device.GetSerialNumber() 34 serial_number = device.GetSerialNumber()
34 # A list so that it is modifiable in Push below. 35 # A list so that it is modifiable in Push below.
(...skipping 21 matching lines...) Expand all
56 parser = optparse.OptionParser() 57 parser = optparse.OptionParser()
57 parser.add_option('--libraries-dir', 58 parser.add_option('--libraries-dir',
58 help='Directory that contains stripped libraries.') 59 help='Directory that contains stripped libraries.')
59 parser.add_option('--device-dir', 60 parser.add_option('--device-dir',
60 help='Device directory to push the libraries to.') 61 help='Device directory to push the libraries to.')
61 parser.add_option('--libraries', 62 parser.add_option('--libraries',
62 help='List of native libraries.') 63 help='List of native libraries.')
63 parser.add_option('--stamp', help='Path to touch on success.') 64 parser.add_option('--stamp', help='Path to touch on success.')
64 parser.add_option('--build-device-configuration', 65 parser.add_option('--build-device-configuration',
65 help='Path to build device configuration.') 66 help='Path to build device configuration.')
66 parser.add_option('--configuration-name', 67 parser.add_option('--output-directory',
67 help='The build CONFIGURATION_NAME') 68 help='The output directory.')
68 options, _ = parser.parse_args(args) 69 options, _ = parser.parse_args(args)
69 70
70 required_options = ['libraries', 'device_dir', 'libraries'] 71 required_options = ['libraries', 'device_dir', 'libraries']
71 build_utils.CheckOptions(options, parser, required=required_options) 72 build_utils.CheckOptions(options, parser, required=required_options)
72 constants.SetBuildType(options.configuration_name) 73
74 devil_chromium.Initialize(
75 output_directory=os.path.abspath(options.output_directory))
73 76
74 DoPush(options) 77 DoPush(options)
75 78
76 if options.stamp: 79 if options.stamp:
77 build_utils.Touch(options.stamp) 80 build_utils.Touch(options.stamp)
78 81
79 82
80 if __name__ == '__main__': 83 if __name__ == '__main__':
81 sys.exit(main(sys.argv[1:])) 84 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « build/android/gyp/jinja_template.py ('k') | build/android/gyp/util/build_device.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698