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

Side by Side Diff: build/android/adb_install_content_shell

Issue 10905138: Add test jar generation logic for ant builds. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: rebase Created 8 years, 3 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/all_android.gyp ('k') | build/android/ant/chromium-jars.xml » ('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 (c) 2012 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2012 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 from multiprocessing import Process 7 from multiprocessing import Process
8 import optparse 8 import optparse
9 import os 9 import os
10 import sys 10 import sys
11 11
12 from pylib import android_commands 12 from pylib import android_commands
13 from pylib import test_options_parser 13 from pylib import test_options_parser
14 from pylib import constants
14 15
15 16
16 def InstallContentShell(device, build_type): 17 def InstallContentShell(device, build_type):
17 apk_path = os.path.join(os.environ['CHROME_SRC'], 18 apk_path = os.path.join(os.environ['CHROME_SRC'],
18 'out', build_type, 19 'out', build_type,
19 'content_shell', 'ContentShell-debug.apk') 20 constants.SDK_BUILD_APKS_DIR, 'ContentShell-debug.apk' )
20 result = android_commands.AndroidCommands(device=device).ManagedInstall( 21 result = android_commands.AndroidCommands(device=device).ManagedInstall(
21 apk_path, False, 'org.chromium.content_shell') 22 apk_path, False, 'org.chromium.content_shell')
22 print '----- Installed on %s -----' % device 23 print '----- Installed on %s -----' % device
23 print result 24 print result
24 25
25 26
26 parser = optparse.OptionParser() 27 parser = optparse.OptionParser()
27 test_options_parser.AddBuildTypeOption(parser) 28 test_options_parser.AddBuildTypeOption(parser)
28 options, args = parser.parse_args(sys.argv) 29 options, args = parser.parse_args(sys.argv)
29 30
30 devices = android_commands.GetAttachedDevices() 31 devices = android_commands.GetAttachedDevices()
31 if not devices: 32 if not devices:
32 raise Exception('Error: no connected devices') 33 raise Exception('Error: no connected devices')
33 34
34 procs = [] 35 procs = []
35 for device in devices: 36 for device in devices:
36 p = Process(target=InstallContentShell, args=(device, options.build_type)) 37 p = Process(target=InstallContentShell, args=(device, options.build_type))
37 p.start() 38 p.start()
38 procs += [p] 39 procs += [p]
39 40
40 for p in procs: 41 for p in procs:
41 p.join() 42 p.join()
OLDNEW
« no previous file with comments | « build/all_android.gyp ('k') | build/android/ant/chromium-jars.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698