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

Side by Side Diff: build/android/gyp/apk_install.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/gcc_preprocess.py ('k') | build/android/gyp/create_device_library_links.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 """Installs an APK. 7 """Installs an APK.
8 8
9 """ 9 """
10 10
11 import optparse 11 import optparse
12 import os 12 import os
13 import subprocess 13 import subprocess
14 import sys 14 import sys
15 15
16 BUILD_ANDROID_DIR = os.path.join(os.path.dirname(__file__), '..') 16 from util import build_utils
17 sys.path.append(BUILD_ANDROID_DIR)
18
19 from pylib import build_utils
20 17
21 18
22 def main(argv): 19 def main(argv):
23 parser = optparse.OptionParser() 20 parser = optparse.OptionParser()
24 parser.add_option('--android-sdk-tools', 21 parser.add_option('--android-sdk-tools',
25 help='Path to Android SDK tools.') 22 help='Path to Android SDK tools.')
26 parser.add_option('--apk-path', 23 parser.add_option('--apk-path',
27 help='Path to .apk to install.') 24 help='Path to .apk to install.')
28 parser.add_option('--stamp', 25 parser.add_option('--stamp',
29 help='Path to touch on success.') 26 help='Path to touch on success.')
30 options, _ = parser.parse_args() 27 options, _ = parser.parse_args()
31 28
32 # TODO(cjhopman): Should this install to all devices/be configurable? 29 # TODO(cjhopman): Should this install to all devices/be configurable?
33 install_cmd = [ 30 install_cmd = [
34 os.path.join(options.android_sdk_tools, 'adb'), 31 os.path.join(options.android_sdk_tools, 'adb'),
35 'install', '-r', 32 'install', '-r',
36 options.apk_path] 33 options.apk_path]
37 34
38 subprocess.check_call(install_cmd) 35 build_utils.CheckCallDie(install_cmd)
39 36
40 if options.stamp: 37 if options.stamp:
41 build_utils.Touch(options.stamp) 38 build_utils.Touch(options.stamp)
42 39
43 40
44 if __name__ == '__main__': 41 if __name__ == '__main__':
45 sys.exit(main(sys.argv)) 42 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « build/android/gcc_preprocess.py ('k') | build/android/gyp/create_device_library_links.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698