mach: run linux unit tests for 'full' try jobs (#34272)

Windows and Mac have unit tests enabled when triggered via 'full'
alias but they are disabled on Linux which is confusing.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
Mukilan Thiyagarajan 2024-11-18 13:53:46 +05:30 committed by GitHub
parent f71f38bd3d
commit 997b6411c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -71,6 +71,9 @@ class JobConfig(object):
self.wpt_layout |= other.wpt_layout
self.unit_tests |= other.unit_tests
# to join "Linux" and "Linux WPT" into "Linux WPT"
if len(other.name) > len(self.name):
self.name = other.name
return True
@ -139,7 +142,7 @@ class Config(object):
self.fail_fast = True
continue # skip over keyword
if word == "full":
words.extend(["linux-wpt", "macos", "windows", "android", "ohos", "lint"])
words.extend(["linux", "linux-wpt", "macos", "windows", "android", "ohos", "lint"])
continue # skip over keyword
job = handle_preset(word)
@ -189,7 +192,7 @@ class TestParser(unittest.TestCase):
"workflow": "linux",
"wpt_layout": "2020",
"profile": "release",
"unit_tests": False,
"unit_tests": True,
"wpt_args": ""
},
{
@ -248,9 +251,14 @@ class TestParser(unittest.TestCase):
a = JobConfig("Linux", Workflow.LINUX, unit_tests=True)
b = JobConfig("Linux", Workflow.LINUX, unit_tests=False)
self.assertTrue(a.merge(b), "Should not merge jobs that have different unit test configurations.")
self.assertTrue(a.merge(b), "Should merge jobs that have different unit test configurations.")
self.assertEqual(a, JobConfig("Linux", Workflow.LINUX, unit_tests=True))
a = handle_preset("linux")
b = handle_preset("linux-wpt")
self.assertTrue(a.merge(b), "Should merge jobs that have different unit test configurations.")
self.assertEqual(a, JobConfig("Linux WPT", Workflow.LINUX, unit_tests=True, wpt_layout=Layout.layout2020))
a = JobConfig("Linux", Workflow.LINUX, unit_tests=True)
b = JobConfig("Mac", Workflow.MACOS, unit_tests=True)
self.assertFalse(a.merge(b), "Should not merge jobs with different workflows.")
@ -267,7 +275,7 @@ class TestParser(unittest.TestCase):
self.assertEqual(a, JobConfig("Linux", Workflow.LINUX, unit_tests=True))
def test_full(self):
self.assertDictEqual(json.loads(Config("linux-wpt macos windows android ohos lint").to_json()),
self.assertDictEqual(json.loads(Config("full").to_json()),
json.loads(Config("").to_json()))