Skip to content

Commit 2278340

Browse files
jmahermoz-wptsync-bot
authored andcommitted
cleanup skipfails and wpt/mochitest harnesses for supporting android emulator.
Differential Revision: https://phabricator.services.mozilla.com/D254846 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1973753 gecko-commit: d5f134543a4f03d65b14c5d91793556f2c16c728 gecko-reviewers: ahal
1 parent c7fd2ce commit 2278340

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tools/wptrunner/wptrunner/wpttest.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,13 +131,14 @@ def __init__(self, metadata_root, product_name, debug,
131131

132132
if adb_binary:
133133
self["adb_binary"] = adb_binary
134+
134135
if device_serials:
135136
# Assume all emulators are identical, so query an arbitrary one.
136137
self._update_with_emulator_info(device_serials[0])
137138
self.pop("linux_distro", None)
138139

139140
def _adb_run(self, device_serial, args, **kwargs):
140-
adb_binary = self.get("adb_binary", "adb")
141+
adb_binary = self.get("adb_binary", os.environ.get("ADB_PATH", "adb"))
141142
cmd = [adb_binary, "-s", device_serial, *args]
142143
return subprocess.check_output(cmd, **kwargs)
143144

@@ -158,6 +159,11 @@ def _update_with_emulator_info(self, device_serial):
158159
"ro.build.version.release",
159160
encoding="utf-8",
160161
),
162+
"android_version": self._adb_get_property(
163+
device_serial,
164+
"ro.build.version.sdk",
165+
encoding="utf-8",
166+
)
161167
}
162168
emulator_info["version"] = emulator_info["os_version"]
163169

0 commit comments

Comments
 (0)