Bug 1347407 - Add an Android 7.0 AVD for mach android-emulator; r=me,test-only
authorGeoff Brown <gbrown@mozilla.com>
Thu, 16 Mar 2017 10:44:42 -0600
changeset 398632 75724abb9c551211fb203a6d3dace2e713896d58
parent 398631 004684088f591ff1ae6116c2c9de97bf300d170f
child 398633 e73241bcb49a399d1de1e512d0334eeece0dcffd
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme, test-only
bugs1347407
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1347407 - Add an Android 7.0 AVD for mach android-emulator; r=me,test-only Add support for 'mach android-emulator --version 7.0'. This AVD is somewhat experimental but has worked well in my initial testing.
mobile/android/mach_commands.py
testing/config/tooltool-manifests/androidarm_7_0/mach-emulator.manifest
testing/mozbase/mozrunner/mozrunner/devices/android_device.py
--- a/mobile/android/mach_commands.py
+++ b/mobile/android/mach_commands.py
@@ -98,18 +98,18 @@ class AndroidEmulatorCommands(MachComman
     """
        Run the Android emulator with one of the AVDs used in the Mozilla
        automated test environment. If necessary, the AVD is fetched from
        the tooltool server and installed.
     """
     @Command('android-emulator', category='devenv',
         conditions=[],
         description='Run the Android emulator with an AVD from test automation.')
-    @CommandArgument('--version', metavar='VERSION', choices=['4.3', '6.0', 'x86', 'x86-6.0'],
-        help='Specify Android version to run in emulator. One of "4.3", "6.0", "x86", or "x86-6.0".',
+    @CommandArgument('--version', metavar='VERSION', choices=['4.3', '6.0', '7.0', 'x86', 'x86-6.0'],
+        help='Specify Android version to run in emulator. One of "4.3", "6.0", "7.0", "x86", or "x86-6.0".',
         default='4.3')
     @CommandArgument('--wait', action='store_true',
         help='Wait for emulator to be closed.')
     @CommandArgument('--force-update', action='store_true',
         help='Update AVD definition even when AVD is already installed.')
     @CommandArgument('--verbose', action='store_true',
         help='Log informative status messages.')
     def emulator(self, version, wait=False, force_update=False, verbose=False):
new file mode 100644
--- /dev/null
+++ b/testing/config/tooltool-manifests/androidarm_7_0/mach-emulator.manifest
@@ -0,0 +1,10 @@
+[
+{
+"size": 408169671,
+"visibility": "public",
+"digest": "c916abc1c0e59328cc7c3de5faee120cb8ab1092fdd8730f5a81a7ca94fa46e8dd310774654d38d00dd01aeed3d919240bfb73b212451313704515cb6aed8edb",
+"algorithm": "sha512",
+"filename": "AVDs-arm64v8a-android-7.0-build-2017-03-14.tar.gz",
+"unpack": true
+}
+]
--- a/testing/mozbase/mozrunner/mozrunner/devices/android_device.py
+++ b/testing/mozbase/mozrunner/mozrunner/devices/android_device.py
@@ -60,16 +60,24 @@ AVD_DICT = {
                     'init,console,gles,memcheck,adbserver,adbclient,adb,avd_config,socket'],
                    5554),
     '6.0': AvdInfo('Android 6.0',
                    'mozemulator-6.0',
                    'testing/config/tooltool-manifests/androidarm_6_0/mach-emulator.manifest',
                    ['-show-kernel', '-debug',
                     'init,console,gles,memcheck,adbserver,adbclient,adb,avd_config,socket'],
                    5554),
+    '7.0': AvdInfo('Android 7.0',
+                   'mozemulator-7.0',
+                   'testing/config/tooltool-manifests/androidarm_7_0/mach-emulator.manifest',
+                   ['-debug',
+                    'init,console,gles,memcheck,adbserver,adbclient,adb,avd_config,socket',
+                    '-ranchu',
+                    '-qemu', '-m', '2048'],
+                   5554),
     'x86': AvdInfo('Android 4.2 x86',
                    'mozemulator-x86',
                    'testing/config/tooltool-manifests/androidx86/mach-emulator.manifest',
                    ['-debug',
                     'init,console,gles,memcheck,adbserver,adbclient,adb,avd_config,socket',
                     '-qemu', '-m', '1024', '-enable-kvm'],
                    5554),
     'x86-6.0': AvdInfo('Android 6.0 x86',
@@ -660,16 +668,17 @@ def _log_warning(text):
     print "WARNING: %s" % text
 
 
 def _log_info(text):
     print "%s" % text
 
 
 def _download_file(url, filename, path):
+    _log_debug("Download %s to %s/%s..." % (url, path, filename))
     f = urllib2.urlopen(url)
     if not os.path.isdir(path):
         try:
             os.makedirs(path)
         except Exception, e:
             _log_warning(str(e))
             return False
     local_file = open(os.path.join(path, filename), 'wb')