Bug 1859548 - filter wpt tests on tag to support webgpu and canvas tests. r=ahal,taskgraph-reviewers

Differential Revision: https://phabricator.services.mozilla.com/D191706
This commit is contained in:
Joel Maher 2023-10-26 15:54:42 +00:00
parent 611f5a1996
commit 160f383369
2 changed files with 17 additions and 1 deletions

View File

@ -158,6 +158,8 @@ def mock_mozinfo():
"tsan": tsan,
"appname": "firefox",
"condprof": False,
"canvas": False,
"webgpu": False,
}
return inner

View File

@ -122,6 +122,13 @@ def guess_mozinfo_from_task(task, repo=""):
value = any("xorigin" in key for key in runtime_keys)
info[tag] = value
# wpt has canvas and webgpu as tags, lets find those
for tag in ["canvas", "webgpu"]:
if tag in task["test-name"]:
info[tag] = True
else:
info[tag] = False
return info
@ -237,7 +244,14 @@ class DefaultLoader(BaseManifestLoader):
if "web-platform-tests" in suite:
manifests = set()
for t in tests:
manifests.add(t["manifest"])
if mozinfo["canvas"]:
if "html/canvas" in t["manifest"]:
manifests.add(t["manifest"])
elif mozinfo["webgpu"]:
if "_mozilla/webgpu" in t["manifest"]:
manifests.add(t["manifest"])
else:
manifests.add(t["manifest"])
return {
"active": list(manifests),
"skipped": [],