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

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

Issue 13473017: CheckCallDie: add option to suppress successful output (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 | « build/android/gyp/apk_install.py ('k') | build/android/gyp/create_native_libraries_header.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 """Creates symlinks to native libraries for an APK. 7 """Creates symlinks to native libraries for an APK.
8 8
9 The native libraries should have previously been pushed to the device (in 9 The native libraries should have previously been pushed to the device (in
10 options.target_dir). This script then creates links in an apk's lib/ folder to 10 options.target_dir). This script then creates links in an apk's lib/ folder to
11 those native libraries. 11 those native libraries.
12 """ 12 """
13 13
14 import json 14 import json
15 import optparse 15 import optparse
16 import os 16 import os
17 import sys 17 import sys
18 18
19 from util import build_utils
20
19 BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), '..') 21 BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), '..')
20 sys.path.append(BUILD_ANDROID_DIR) 22 sys.path.append(BUILD_ANDROID_DIR)
21 23
22 from pylib import android_commands 24 from pylib import android_commands
23 from pylib import build_utils
24 from pylib.utils import apk_helper 25 from pylib.utils import apk_helper
25 26
26 27
27 def CreateLinks(options): 28 def CreateLinks(options):
28 libraries = build_utils.ReadJson(options.libraries_json) 29 libraries = build_utils.ReadJson(options.libraries_json)
29 apk_package = apk_helper.GetPackageName(options.apk) 30 apk_package = apk_helper.GetPackageName(options.apk)
30 31
31 # There is a large (~100ms) overhead for each call to adb.RunShellCommand. To 32 # There is a large (~100ms) overhead for each call to adb.RunShellCommand. To
32 # avoid this overhead, craft a single command that creates all the links. 33 # avoid this overhead, craft a single command that creates all the links.
33 link = '/data/data/' + apk_package + '/lib/$f' 34 link = '/data/data/' + apk_package + '/lib/$f'
(...skipping 29 matching lines...) Expand all
63 build_utils.CheckOptions(options, parser, required=required_options) 64 build_utils.CheckOptions(options, parser, required=required_options)
64 65
65 CreateLinks(options) 66 CreateLinks(options)
66 67
67 if options.stamp: 68 if options.stamp:
68 build_utils.Touch(options.stamp) 69 build_utils.Touch(options.stamp)
69 70
70 71
71 if __name__ == '__main__': 72 if __name__ == '__main__':
72 sys.exit(main(sys.argv)) 73 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « build/android/gyp/apk_install.py ('k') | build/android/gyp/create_native_libraries_header.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698