Skip to content

Commit aa7f1bc

Browse files
committed
Bug 1917582 - Fix mach addtest for wpt tests, r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D221473
1 parent 664e5cc commit aa7f1bc

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

testing/addtest.py

+4-5
Original file line numberDiff line numberDiff line change
@@ -351,8 +351,7 @@ def write_to_manifest_file(manifest_file, filename):
351351

352352

353353
def creator_for_suite(suite):
354-
if suite.split("-")[0] == "mochitest":
355-
base_suite = "mochitest"
356-
else:
357-
base_suite = suite.rsplit("-", 1)[0]
358-
return TEST_CREATORS.get(base_suite)
354+
for key, creator in TEST_CREATORS.items():
355+
if suite.startswith(key):
356+
return creator
357+
return None

testing/mach_commands.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -74,15 +74,15 @@ def get_test_parser():
7474
"mochitest-chrome",
7575
"mochitest-plain",
7676
"mochitest-browser-chrome",
77-
"web-platform-tests-testharness",
77+
"web-platform-tests",
7878
"web-platform-tests-reftest",
7979
"xpcshell",
8080
]
8181
ADD_TEST_SUPPORTED_DOCS = ["js", "html", "xhtml", "xul"]
8282

8383
SUITE_SYNONYMS = {
84-
"wpt": "web-platform-tests-testharness",
85-
"wpt-testharness": "web-platform-tests-testharness",
84+
"wpt": "web-platform-tests",
85+
"wpt-testharness": "web-platform-tests",
8686
"wpt-reftest": "web-platform-tests-reftest",
8787
}
8888

@@ -297,7 +297,7 @@ def guess_suite(abs_test):
297297
)
298298

299299
if in_wpt_folder:
300-
guessed_suite = "web-platform-tests-testharness"
300+
guessed_suite = "web-platform-tests"
301301
if "/css/" in abs_test:
302302
guessed_suite = "web-platform-tests-reftest"
303303
elif (

0 commit comments

Comments
 (0)