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

Side by Side Diff: build/android/avd.py

Issue 23513022: android: Point EMULATOR_SDK_ROOT to a location inside the repository. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Same patch, rebased on top of r223028 Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | build/android/install_emulator_deps.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 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """Launches Android Virtual Devices with a set configuration for testing Chrome. 6 """Launches Android Virtual Devices with a set configuration for testing Chrome.
7 7
8 The script will launch a specified number of Android Virtual Devices (AVD's). 8 The script will launch a specified number of Android Virtual Devices (AVD's).
9 """ 9 """
10 10
11 11
12 import install_emulator_deps 12 import install_emulator_deps
13 import logging 13 import logging
14 import optparse 14 import optparse
15 import os 15 import os
16 import subprocess 16 import subprocess
17 import sys 17 import sys
18 18
19 from pylib import constants 19 from pylib import constants
20 from pylib.utils import emulator 20 from pylib.utils import emulator
21 21
22 22
23 def main(argv): 23 def main(argv):
24 # ANDROID_SDK_ROOT needs to be set to the location of the SDK used to launch 24 # ANDROID_SDK_ROOT needs to be set to the location of the SDK used to launch
25 # the emulator to find the system images upon launch. 25 # the emulator to find the system images upon launch.
26 emulator_sdk = os.path.join(constants.EMULATOR_SDK_ROOT, 26 os.environ['ANDROID_SDK_ROOT'] = constants.ANDROID_SDK_ROOT
27 'android_tools', 'sdk')
28 os.environ['ANDROID_SDK_ROOT'] = emulator_sdk
29 27
30 opt_parser = optparse.OptionParser(description='AVD script.') 28 opt_parser = optparse.OptionParser(description='AVD script.')
31 opt_parser.add_option('-n', '--num', dest='emulator_count', 29 opt_parser.add_option('-n', '--num', dest='emulator_count',
32 help='Number of emulators to launch (default is 1).', 30 help='Number of emulators to launch (default is 1).',
33 type='int', default='1') 31 type='int', default='1')
34 opt_parser.add_option('--abi', default='x86', 32 opt_parser.add_option('--abi', default='x86',
35 help='Platform of emulators to launch (x86 default).') 33 help='Platform of emulators to launch (x86 default).')
36 34
37 options, _ = opt_parser.parse_args(argv[1:]) 35 options, _ = opt_parser.parse_args(argv[1:])
38 36
(...skipping 15 matching lines...) Expand all
54 if not install_emulator_deps.CheckSDK(): 52 if not install_emulator_deps.CheckSDK():
55 logging.critical('ERROR: Emulator SDK not installed. Run ' 53 logging.critical('ERROR: Emulator SDK not installed. Run '
56 'install_emulator_deps.py.') 54 'install_emulator_deps.py.')
57 return 1 55 return 1
58 56
59 emulator.LaunchEmulators(options.emulator_count, options.abi, True) 57 emulator.LaunchEmulators(options.emulator_count, options.abi, True)
60 58
61 59
62 if __name__ == '__main__': 60 if __name__ == '__main__':
63 sys.exit(main(sys.argv)) 61 sys.exit(main(sys.argv))
OLDNEW
« no previous file with comments | « no previous file | build/android/install_emulator_deps.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698