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

Unified Diff: build/android/avd.py

Issue 72383005: Emulator script improvements: config templates, --api-level, and mips support. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 7 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/android/avd_configs/AVD_for_Galaxy_Nexus_by_Google_arm.avd/config.ini » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/avd.py
diff --git a/build/android/avd.py b/build/android/avd.py
index 43bb3eaba5d4b99e086a3be82fde798e2701513b..d9cb82c7de32f84f5e64bf94eb899b5517dab0f4 100755
--- a/build/android/avd.py
+++ b/build/android/avd.py
@@ -32,6 +32,9 @@ def main(argv):
type='int', default='1')
opt_parser.add_option('--abi', default='x86',
help='Platform of emulators to launch (x86 default).')
+ opt_parser.add_option('--api-level', dest='api_level',
+ help='API level for the image, e.g. 19 for Android 4.4',
+ type='int', default=constants.ANDROID_SDK_VERSION)
options, _ = opt_parser.parse_args(argv[1:])
@@ -40,12 +43,14 @@ def main(argv):
logging.root.setLevel(logging.INFO)
# Check if KVM is enabled for x86 AVD's and check for x86 system images.
+ # TODO(andrewhayden) Since we can fix all of these with install_emulator_deps
+ # why don't we just run it?
if options.abi =='x86':
if not install_emulator_deps.CheckKVM():
logging.critical('ERROR: KVM must be enabled in BIOS, and installed. '
'Enable KVM in BIOS and run install_emulator_deps.py')
return 1
- elif not install_emulator_deps.CheckX86Image():
+ elif not install_emulator_deps.CheckX86Image(options.api_level):
logging.critical('ERROR: System image for x86 AVD not installed. Run '
'install_emulator_deps.py')
return 1
@@ -55,7 +60,13 @@ def main(argv):
'install_emulator_deps.py.')
return 1
- emulator.LaunchEmulators(options.emulator_count, options.abi, True)
+ if not install_emulator_deps.CheckSDKPlatform(options.api_level):
+ logging.critical('ERROR: Emulator SDK missing required target for API %d. '
+ 'Run install_emulator_deps.py.')
+ return 1
+
+ emulator.LaunchEmulators(options.emulator_count, options.abi,
+ options.api_level, True)
if __name__ == '__main__':
« no previous file with comments | « no previous file | build/android/avd_configs/AVD_for_Galaxy_Nexus_by_Google_arm.avd/config.ini » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698