diff options
-rwxr-xr-x | build/android/install_emulator_deps.py | 6 | ||||
-rw-r--r-- | build/android/pylib/gtest/dispatch.py | 1 | ||||
-rwxr-xr-x | build/android/pylib/utils/emulator.py | 2 | ||||
-rw-r--r-- | build/android/pylib/utils/test_options_parser.py | 2 |
4 files changed, 8 insertions, 3 deletions
diff --git a/build/android/install_emulator_deps.py b/build/android/install_emulator_deps.py index ff84367..bb544c2 100755 --- a/build/android/install_emulator_deps.py +++ b/build/android/install_emulator_deps.py @@ -59,8 +59,10 @@ def CheckKVM(): Returns: True if kvm-ok returns 0 (already enabled) """ - rc = cmd_helper.RunCmd(['kvm-ok']) - return not rc + try: + return not cmd_helper.RunCmd(['kvm-ok']) + except OSError: + return False def GetSDK(): diff --git a/build/android/pylib/gtest/dispatch.py b/build/android/pylib/gtest/dispatch.py index 2855c31..8fc9854 100644 --- a/build/android/pylib/gtest/dispatch.py +++ b/build/android/pylib/gtest/dispatch.py @@ -122,6 +122,7 @@ def _RunATestSuite(options, suite_name): if options.use_emulator: buildbot_emulators = emulator.LaunchEmulators(options.emulator_count, + options.abi, wait_for_boot=True) attached_devices = [e.device for e in buildbot_emulators] elif options.test_device: diff --git a/build/android/pylib/utils/emulator.py b/build/android/pylib/utils/emulator.py index df77c52..d2943549 100755 --- a/build/android/pylib/utils/emulator.py +++ b/build/android/pylib/utils/emulator.py @@ -213,7 +213,7 @@ class Emulator(object): '--silent', 'delete', 'avd', - '--name', self.avd, + '--name', self.avd_name, ] avd_process = subprocess.Popen(args=avd_command, stdout=subprocess.PIPE, diff --git a/build/android/pylib/utils/test_options_parser.py b/build/android/pylib/utils/test_options_parser.py index 94d04a3..98e5c15 100644 --- a/build/android/pylib/utils/test_options_parser.py +++ b/build/android/pylib/utils/test_options_parser.py @@ -126,6 +126,8 @@ def AddGTestOptions(option_parser): option_parser.add_option('--exe', action='store_true', help='If set, use the exe test runner instead of ' 'the APK.') + option_parser.add_option('--abi', default='armeabi-v7a', + help='Platform of emulators to launch.') def AddCommonInstrumentationOptions(option_parser): |