mach try: Add wpt alias for linux-wpt (#36416)

Add `wpt` alias for `linux-wpt` in try_parser, because that's the what I
have in muscle memory.

Testing: Tested with new try_parser unit tests.

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
sagudev 2025-04-09 13:23:27 +02:00 committed by GitHub
parent 9c29acd6d8
commit 15cac97ada
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -154,6 +154,9 @@ class Config(object):
if word in ["fail-fast", "failfast", "fail_fast"]:
self.fail_fast = True
continue # skip over keyword
if word == "wpt":
words.extend(["linux-wpt"])
continue # skip over keyword
if word == "full":
words.extend(["linux-unit-tests", "linux-wpt", "linux-bencher"])
words.extend(["macos-unit-tests", "windows-unit-tests", "android", "ohos", "lint"])
@ -318,6 +321,10 @@ class TestParser(unittest.TestCase):
self.assertDictEqual(json.loads(Config("full").to_json()),
json.loads(Config("").to_json()))
def test_wpt_alias(self):
self.assertDictEqual(json.loads(Config("wpt").to_json()),
json.loads(Config("linux-wpt").to_json()))
def run_tests():
verbosity = 1 if logging.getLogger().level >= logging.WARN else 2