mirror of
https://github.com/servo/servo.git
synced 2025-07-22 14:53:49 +01:00
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:
parent
f71f38bd3d
commit
997b6411c0
1 changed files with 12 additions and 4 deletions
|
@ -71,6 +71,9 @@ class JobConfig(object):
|
||||||
|
|
||||||
self.wpt_layout |= other.wpt_layout
|
self.wpt_layout |= other.wpt_layout
|
||||||
self.unit_tests |= other.unit_tests
|
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
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
@ -139,7 +142,7 @@ class Config(object):
|
||||||
self.fail_fast = True
|
self.fail_fast = True
|
||||||
continue # skip over keyword
|
continue # skip over keyword
|
||||||
if word == "full":
|
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
|
continue # skip over keyword
|
||||||
|
|
||||||
job = handle_preset(word)
|
job = handle_preset(word)
|
||||||
|
@ -189,7 +192,7 @@ class TestParser(unittest.TestCase):
|
||||||
"workflow": "linux",
|
"workflow": "linux",
|
||||||
"wpt_layout": "2020",
|
"wpt_layout": "2020",
|
||||||
"profile": "release",
|
"profile": "release",
|
||||||
"unit_tests": False,
|
"unit_tests": True,
|
||||||
"wpt_args": ""
|
"wpt_args": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -248,9 +251,14 @@ class TestParser(unittest.TestCase):
|
||||||
|
|
||||||
a = JobConfig("Linux", Workflow.LINUX, unit_tests=True)
|
a = JobConfig("Linux", Workflow.LINUX, unit_tests=True)
|
||||||
b = JobConfig("Linux", Workflow.LINUX, unit_tests=False)
|
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))
|
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)
|
a = JobConfig("Linux", Workflow.LINUX, unit_tests=True)
|
||||||
b = JobConfig("Mac", Workflow.MACOS, unit_tests=True)
|
b = JobConfig("Mac", Workflow.MACOS, unit_tests=True)
|
||||||
self.assertFalse(a.merge(b), "Should not merge jobs with different workflows.")
|
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))
|
self.assertEqual(a, JobConfig("Linux", Workflow.LINUX, unit_tests=True))
|
||||||
|
|
||||||
def test_full(self):
|
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()))
|
json.loads(Config("").to_json()))
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue