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

Unified Diff: build/android/avd.py

Issue 12407004: Add script to download SDK, system images and create and start AVDs for testing. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed install stuff to install script and addressed reviews. Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/android/emulator.py » ('j') | build/android/install-emulator-deps.py » ('J')
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
new file mode 100755
index 0000000000000000000000000000000000000000..d591cd2b1ca79bc62c4517d0861958161c5b5acd
--- /dev/null
+++ b/build/android/avd.py
@@ -0,0 +1,50 @@
+#!/usr/bin/env python
+# Copyright (c) 2012 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""Launches Android Virtual Devices with a set configuration for testing Chrome.
+
+The script will launch a specified number of Android Virtual Devices (AVD's).
+"""
+
+
+import logging
+import optparse
+import os
+import subprocess
+import sys
+
+from pylib.utils import emulator
+
+
+def main(argv):
+ # Run script from parent directory of chrome checkout, where emulator SDK is
+ # installed by install-emulator-deps.py
+ new_cwd = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..',
+ '..', '..')
+ # The location of the SDK used to launch the emulator
+ emulator_sdk = os.path.join(new_cwd, 'android_tools', 'sdk')
+ os.environ['ANDROID_SDK_ROOT'] = emulator_sdk
+
+ opt_parser = optparse.OptionParser(description='AVD script.')
+ opt_parser.add_option('-n', '--num', dest='emulator_count',
+ help='Number of emulators to launch.',
+ type='int', default='1')
+ opt_parser.add_option('--abi', default='arm',
+ help='Platform of emulators to launch.')
+
+ options, _ = opt_parser.parse_args(argv[1:])
+ if options.abi == 'arm':
+ options.abi = 'armeabi-v7a'
+
+ logging.basicConfig(level=logging.INFO,
+ format='# %(asctime)-15s: %(message)s')
+ logging.root.setLevel(logging.INFO)
+
+ emulator.LaunchEmulators(emulator_sdk, options.emulator_count, options.abi,
+ True)
+
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))
« no previous file with comments | « no previous file | build/android/emulator.py » ('j') | build/android/install-emulator-deps.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698