OLD | NEW |
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 re | 16 import re |
17 import sys | 17 import sys |
18 | 18 |
19 from pylib import cmd_helper | 19 from devil.utils import cmd_helper |
20 from pylib import constants | 20 from pylib import constants |
21 from pylib.utils import emulator | 21 from pylib.utils import emulator |
22 | 22 |
23 | 23 |
24 def main(argv): | 24 def main(argv): |
25 # ANDROID_SDK_ROOT needs to be set to the location of the SDK used to launch | 25 # ANDROID_SDK_ROOT needs to be set to the location of the SDK used to launch |
26 # the emulator to find the system images upon launch. | 26 # the emulator to find the system images upon launch. |
27 emulator_sdk = os.path.join(constants.EMULATOR_SDK_ROOT, 'sdk') | 27 emulator_sdk = os.path.join(constants.EMULATOR_SDK_ROOT, 'sdk') |
28 os.environ['ANDROID_SDK_ROOT'] = emulator_sdk | 28 os.environ['ANDROID_SDK_ROOT'] = emulator_sdk |
29 | 29 |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 if options.name: | 87 if options.name: |
88 emulator.LaunchEmulator(options.name, options.abi) | 88 emulator.LaunchEmulator(options.name, options.abi) |
89 else: | 89 else: |
90 emulator.LaunchTempEmulators(options.emulator_count, options.abi, | 90 emulator.LaunchTempEmulators(options.emulator_count, options.abi, |
91 options.api_level, True) | 91 options.api_level, True) |
92 | 92 |
93 | 93 |
94 | 94 |
95 if __name__ == '__main__': | 95 if __name__ == '__main__': |
96 sys.exit(main(sys.argv)) | 96 sys.exit(main(sys.argv)) |
OLD | NEW |