commit 8753b58ed4740ed47f4698012e32b17dd9208319
parent 6dde3a3ac74a9efcca10a45d0cf08378c7518c18
Author: James C Scott III <jcscottiii@users.noreply.github.com>
Date: Wed, 15 Oct 2025 08:22:43 +0000
Bug 1993038 [wpt PR 55283] - Update android.py to use API 34, a=testonly
Automatic update from web-platform-tests
Update android.py to use API 34 (#55283)
* Update android.py to use API 26
See https://github.com/web-platform-tests/wpt/issues/55282
* Update android.py to API 34
* Update AVD manifest to match mozilla-central
* Match the AVD settings in mozilla-central
---------
Co-authored-by: jgraham <james@hoppipolla.co.uk>
--
wpt-commits: dd6f2c3753d023b0ff0cea28558362e41bc5896a
wpt-pr: 55283
Diffstat:
3 files changed, 27 insertions(+), 70 deletions(-)
diff --git a/testing/web-platform/tests/infrastructure/metadata/infrastructure/testdriver/actions/elementTiming.html.ini b/testing/web-platform/tests/infrastructure/metadata/infrastructure/testdriver/actions/elementTiming.html.ini
@@ -1,4 +0,0 @@
-[elementTiming.html]
- [TestDriver actions: element timing]
- expected:
- if product == "firefox_android": FAIL
diff --git a/testing/web-platform/tests/tools/wpt/android.py b/testing/web-platform/tests/tools/wpt/android.py
@@ -20,30 +20,8 @@ CMDLINE_TOOLS_VERSION_STRING = "12.0"
CMDLINE_TOOLS_VERSION = "11076708"
AVD_MANIFEST_X86_64 = {
- "emulator_package": "system-images;android-24;default;x86_64",
- "emulator_avd_name": "mozemulator-x86_64",
- "emulator_extra_args": [
- "-skip-adb-auth",
- "-verbose",
- "-show-kernel",
- "-ranchu",
- "-selinux", "permissive",
- "-memory", "3072",
- "-cores", "4",
- "-skin", "800x1280",
- "-gpu", "on",
- "-no-snapstorage",
- "-no-snapshot",
- "-no-window",
- "-no-accel",
- "-prop", "ro.test_harness=true"
- ],
- "emulator_extra_config": {
- "hw.keyboard": "yes",
- "hw.lcd.density": "320",
- "disk.dataPartition.size": "4000MB",
- "sdcard.size": "600M"
- }
+ "emulator_package": "system-images;android-34;google_apis;x86_64",
+ "emulator_avd_name": "mozemulator-android34-x86_64"
}
@@ -57,6 +35,29 @@ def do_delayed_imports(paths):
"tooltool",
"tooltool.py")
android_device.EMULATOR_HOME_DIR = paths["emulator_home"]
+ android_device.AVD_DICT["x86_64"] = android_device.AvdInfo(
+ "Android x86_64",
+ "mozemulator-android34-x86_64",
+ [
+ "-skip-adb-auth",
+ "-verbose",
+ "-show-kernel",
+ "-ranchu",
+ "-selinux",
+ "permissive",
+ "-memory",
+ "4096",
+ "-cores",
+ "8",
+ "-prop",
+ "ro.test_harness=true",
+ "-no-snapstorage",
+ "-no-snapshot",
+ "-skin",
+ "1080x1920",
+ ],
+ True,
+ )
def get_parser_install():
@@ -79,45 +80,6 @@ def get_parser_start():
return parser
-def install_fixed_emulator_version(logger, paths):
- # Downgrade to a pinned emulator version
- # See https://developer.android.com/studio/emulator_archive for what we're doing here
- from xml.etree import ElementTree
-
- version = "32.1.15"
- urls = {"linux": "https://redirector.gvt1.com/edgedl/android/repository/emulator-linux_x64-10696886.zip"}
-
- os_name = platform.system().lower()
- if os_name not in urls:
- logger.error(f"Don't know how to install old emulator for {os_name}, using latest version")
- # For now try with the latest version if this fails
- return
-
- logger.info(f"Downgrading emulator to {version}")
- url = urls[os_name]
-
- emulator_path = os.path.join(paths["sdk"], "emulator")
- latest_emulator_path = os.path.join(paths["sdk"], "emulator_latest")
- if os.path.exists(latest_emulator_path):
- shutil.rmtree(latest_emulator_path)
- os.rename(emulator_path, latest_emulator_path)
-
- download_and_extract(url, paths["sdk"])
- package_path = os.path.join(emulator_path, "package.xml")
- shutil.copyfile(os.path.join(latest_emulator_path, "package.xml"),
- package_path)
-
- with open(package_path) as f:
- tree = ElementTree.parse(f)
- node = tree.find("localPackage").find("revision")
- assert len(node) == 3
- parts = version.split(".")
- for version_part, node in zip(parts, node):
- node.text = version_part
- with open(package_path, "wb") as f:
- tree.write(f, encoding="utf8")
-
-
def get_paths(dest):
os_name = platform.system().lower()
@@ -296,8 +258,6 @@ def install(logger, dest=None, reinstall=False, prompt=True):
install_avd(logger, paths, prompt=prompt)
- install_fixed_emulator_version(logger, paths)
-
emulator = get_emulator(paths)
return emulator
diff --git a/testing/web-platform/tests/tools/wpt/commands.json b/testing/web-platform/tests/tools/wpt/commands.json
@@ -78,7 +78,8 @@
"help": "Setup the x86 android emulator",
"virtualenv": true,
"requirements": [
- "requirements.txt"
+ "requirements.txt",
+ "requirements_android.txt"
]
},
"start-android-emulator": {