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

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

Issue 1571803002: [Android] Prepare build/android/ for catapult+devil. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@create-device-library-links
Patch Set: Created 4 years, 11 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
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 import argparse 11 import argparse
12 import logging 12 import logging
13 import os 13 import os
14 import re 14 import re
15 import sys 15 import sys
16 16
17 import devil_chromium
17 import install_emulator_deps 18 import install_emulator_deps
18 19
19 from devil.utils import cmd_helper 20 from devil.utils import cmd_helper
20 from pylib import constants 21 from pylib import constants
21 from pylib.utils import emulator 22 from pylib.utils import emulator
22 23
23 def main(argv): 24 def main(argv):
24 # 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
25 # the emulator to find the system images upon launch. 26 # the emulator to find the system images upon launch.
26 emulator_sdk = constants.ANDROID_SDK_ROOT 27 emulator_sdk = constants.ANDROID_SDK_ROOT
(...skipping 27 matching lines...) Expand all
54 run_parser.add_argument('--launch-without-kill', action='store_false', 55 run_parser.add_argument('--launch-without-kill', action='store_false',
55 dest='kill_and_launch', default=True, 56 dest='kill_and_launch', default=True,
56 help='Kill all emulators at launch') 57 help='Kill all emulators at launch')
57 run_parser.add_argument('--enable-kvm', action='store_true', 58 run_parser.add_argument('--enable-kvm', action='store_true',
58 dest='enable_kvm', default=False) 59 dest='enable_kvm', default=False)
59 60
60 arguments = arg_parser.parse_args(argv[1:]) 61 arguments = arg_parser.parse_args(argv[1:])
61 62
62 logging.root.setLevel(logging.INFO) 63 logging.root.setLevel(logging.INFO)
63 64
65 devil_chromium.Initialize()
66
64 if arguments.command == 'kill': 67 if arguments.command == 'kill':
65 logging.info('Killing all existing emulator and existing the program') 68 logging.info('Killing all existing emulator and existing the program')
66 emulator.KillAllEmulators() 69 emulator.KillAllEmulators()
67 return 70 return
68 if arguments.command == 'delete': 71 if arguments.command == 'delete':
69 emulator.DeleteAllTempAVDs() 72 emulator.DeleteAllTempAVDs()
70 return 73 return
71 74
72 # Check if SDK exist in ANDROID_SDK_ROOT 75 # Check if SDK exist in ANDROID_SDK_ROOT
73 if not install_emulator_deps.CheckSDK(): 76 if not install_emulator_deps.CheckSDK():
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 arguments.api_level, 127 arguments.api_level,
125 enable_kvm=arguments.enable_kvm, 128 enable_kvm=arguments.enable_kvm,
126 kill_and_launch=arguments.kill_and_launch, 129 kill_and_launch=arguments.kill_and_launch,
127 sdcard_size=arguments.sdcard_size, 130 sdcard_size=arguments.sdcard_size,
128 storage_size=arguments.partition_size, 131 storage_size=arguments.partition_size,
129 wait_for_boot=True 132 wait_for_boot=True
130 ) 133 )
131 134
132 if __name__ == '__main__': 135 if __name__ == '__main__':
133 sys.exit(main(sys.argv)) 136 sys.exit(main(sys.argv))
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698