mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Remove references to 2020 layout in try_parser.py (#36047)
* Remove references to 2020 layout in try_parser.py Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com> * Removed all references to CHANGE Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com> * Updated .yml workflow files Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com> * update more references Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com> * fixed right hand argument Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com> * Fixing more references Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com> * mach: remove unused import in try_parser.py Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * ci: update reference to wpt_layout in try.yml Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> --------- Signed-off-by: MDCODE247 <ammedabubakard500@gmail.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
This commit is contained in:
parent
cee84c824f
commit
3b293f4949
8 changed files with 40 additions and 64 deletions
8
.github/workflows/dispatch-workflow.yml
vendored
8
.github/workflows/dispatch-workflow.yml
vendored
|
@ -11,9 +11,9 @@ on:
|
|||
wpt-args:
|
||||
required: true
|
||||
type: string
|
||||
wpt-layout:
|
||||
wpt:
|
||||
required: true
|
||||
type: string
|
||||
type: boolean
|
||||
unit-tests:
|
||||
required: true
|
||||
type: boolean
|
||||
|
@ -43,7 +43,7 @@ jobs:
|
|||
secrets: inherit
|
||||
with:
|
||||
profile: ${{ inputs.profile }}
|
||||
wpt-layout: ${{ inputs.wpt-layout }}
|
||||
wpt: ${{ inputs.wpt }}
|
||||
unit-tests: ${{ inputs.unit-tests }}
|
||||
build-libservo: ${{ inputs.build-libservo }}
|
||||
wpt-args: ${{ inputs.wpt-args }}
|
||||
|
@ -56,7 +56,7 @@ jobs:
|
|||
secrets: inherit
|
||||
with:
|
||||
profile: ${{ inputs.profile }}
|
||||
wpt-layout: ${{ inputs.wpt-layout }}
|
||||
wpt: ${{ inputs.wpt }}
|
||||
unit-tests: ${{ inputs.unit-tests }}
|
||||
build-libservo: ${{ inputs.build-libservo }}
|
||||
wpt-args: ${{ inputs.wpt-args }}
|
||||
|
|
11
.github/workflows/linux.yml
vendored
11
.github/workflows/linux.yml
vendored
|
@ -14,9 +14,9 @@ on:
|
|||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
wpt-layout:
|
||||
wpt:
|
||||
required: false
|
||||
type: string
|
||||
type: boolean
|
||||
unit-tests:
|
||||
required: false
|
||||
default: false
|
||||
|
@ -55,10 +55,9 @@ on:
|
|||
default: false
|
||||
required: false
|
||||
type: boolean
|
||||
wpt-layout:
|
||||
wpt:
|
||||
required: false
|
||||
type: choice
|
||||
options: ["none", "2020", "all"]
|
||||
type: boolean
|
||||
unit-tests:
|
||||
required: false
|
||||
default: false
|
||||
|
@ -216,7 +215,7 @@ jobs:
|
|||
path: target.tar.gz
|
||||
|
||||
wpt-2020:
|
||||
if: ${{ inputs.wpt-layout == '2020' || inputs.wpt-layout == 'all' }}
|
||||
if: ${{ inputs.wpt }}
|
||||
name: Linux WPT
|
||||
needs: ["build"]
|
||||
uses: ./.github/workflows/linux-wpt.yml
|
||||
|
|
11
.github/workflows/mac.yml
vendored
11
.github/workflows/mac.yml
vendored
|
@ -11,9 +11,9 @@ on:
|
|||
default: ""
|
||||
required: false
|
||||
type: string
|
||||
wpt-layout:
|
||||
wpt:
|
||||
required: false
|
||||
type: string
|
||||
type: boolean
|
||||
unit-tests:
|
||||
required: false
|
||||
default: false
|
||||
|
@ -48,10 +48,9 @@ on:
|
|||
default: ""
|
||||
required: false
|
||||
type: string
|
||||
wpt-layout:
|
||||
wpt:
|
||||
required: false
|
||||
type: choice
|
||||
options: ["none", "2020", "all"]
|
||||
type: boolean
|
||||
unit-tests:
|
||||
required: false
|
||||
default: false
|
||||
|
@ -206,7 +205,7 @@ jobs:
|
|||
path: target.tar.gz
|
||||
|
||||
wpt-2020:
|
||||
if: ${{ inputs.wpt-layout == '2020' || inputs.wpt-layout == 'all' }}
|
||||
if: ${{ inputs.wpt }}
|
||||
name: MacOS WPT
|
||||
needs: ["build"]
|
||||
uses: ./.github/workflows/mac-wpt.yml
|
||||
|
|
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
@ -51,7 +51,7 @@ jobs:
|
|||
secrets: inherit
|
||||
with:
|
||||
workflow: ${{ matrix.workflow }}
|
||||
wpt-layout: ${{ matrix.wpt_layout }}
|
||||
wpt: ${{ matrix.wpt }}
|
||||
profile: ${{ matrix.profile }}
|
||||
unit-tests: ${{ matrix.unit_tests }}
|
||||
build-libservo: ${{ matrix.build_libservo }}
|
||||
|
|
2
.github/workflows/scheduled-wpt-import.yml
vendored
2
.github/workflows/scheduled-wpt-import.yml
vendored
|
@ -16,7 +16,7 @@ jobs:
|
|||
uses: ./.github/workflows/linux.yml
|
||||
with:
|
||||
wpt-sync-from-upstream: true
|
||||
wpt-layout: 'all'
|
||||
wpt: true
|
||||
unit-tests: false
|
||||
|
||||
sync:
|
||||
|
|
2
.github/workflows/try-label.yml
vendored
2
.github/workflows/try-label.yml
vendored
|
@ -123,7 +123,7 @@ jobs:
|
|||
secrets: inherit
|
||||
with:
|
||||
workflow: ${{ matrix.workflow }}
|
||||
wpt-layout: ${{ matrix.wpt_layout }}
|
||||
wpt: ${{ matrix.wpt }}
|
||||
profile: ${{ matrix.profile }}
|
||||
unit-tests: ${{ matrix.unit_tests }}
|
||||
build-libservo: ${{ matrix.build_libservo }}
|
||||
|
|
9
.github/workflows/try.yml
vendored
9
.github/workflows/try.yml
vendored
|
@ -14,10 +14,9 @@ on:
|
|||
default: ""
|
||||
required: false
|
||||
type: string
|
||||
wpt-layout:
|
||||
wpt:
|
||||
required: false
|
||||
type: choice
|
||||
options: ["none", "2020", "all"]
|
||||
type: boolean
|
||||
unit-tests:
|
||||
required: false
|
||||
type: boolean
|
||||
|
@ -78,7 +77,7 @@ jobs:
|
|||
// Process `workflow_dispatch` provided configuration overrides.
|
||||
if (context.eventName == "workflow_dispatch") {
|
||||
// WPT-related overrides only affect Linux currently, as tests don't run by default on other platforms.
|
||||
configuration.matrix[0].wpt_layout = "${{ inputs.wpt-layout }}" || "none";
|
||||
configuration.matrix[0].wpt = Boolean(${{ inputs.wpt }});
|
||||
configuration.matrix[0].wpt_args = "${{ inputs.wpt-args }}" || "";
|
||||
|
||||
let unit_tests = Boolean(${{ inputs.unit-tests }});
|
||||
|
@ -104,7 +103,7 @@ jobs:
|
|||
secrets: inherit
|
||||
with:
|
||||
workflow: ${{ matrix.workflow }}
|
||||
wpt-layout: ${{ matrix.wpt_layout }}
|
||||
wpt: ${{ matrix.wpt }}
|
||||
profile: ${{ matrix.profile }}
|
||||
unit-tests: ${{ matrix.unit_tests }}
|
||||
build-libservo: ${{ matrix.build_libservo }}
|
||||
|
|
|
@ -18,24 +18,7 @@ import unittest
|
|||
import logging
|
||||
|
||||
from dataclasses import dataclass
|
||||
from enum import Enum, Flag, auto
|
||||
|
||||
|
||||
class Layout(Flag):
|
||||
none = 0
|
||||
layout2020 = auto()
|
||||
|
||||
@staticmethod
|
||||
def all():
|
||||
return Layout.layout2020
|
||||
|
||||
def to_string(self):
|
||||
if Layout.all() in self:
|
||||
return "all"
|
||||
elif Layout.layout2020 in self:
|
||||
return "2020"
|
||||
else:
|
||||
return "none"
|
||||
from enum import Enum
|
||||
|
||||
|
||||
class Workflow(str, Enum):
|
||||
|
@ -51,7 +34,7 @@ class Workflow(str, Enum):
|
|||
class JobConfig(object):
|
||||
name: str
|
||||
workflow: Workflow = Workflow.LINUX
|
||||
wpt_layout: Layout = Layout.none
|
||||
wpt: bool = False
|
||||
profile: str = "release"
|
||||
unit_tests: bool = False
|
||||
build_libservo: bool = False
|
||||
|
@ -68,7 +51,7 @@ class JobConfig(object):
|
|||
if getattr(self, field) != getattr(other, field):
|
||||
return False
|
||||
|
||||
self.wpt_layout |= other.wpt_layout
|
||||
self.wpt |= other.wpt
|
||||
self.unit_tests |= other.unit_tests
|
||||
self.build_libservo |= other.build_libservo
|
||||
self.bencher |= other.bencher
|
||||
|
@ -93,7 +76,7 @@ class JobConfig(object):
|
|||
modifier.append("Unit Tests")
|
||||
if self.build_libservo:
|
||||
modifier.append("Build libservo")
|
||||
if self.wpt_layout != Layout.none:
|
||||
if self.wpt:
|
||||
modifier.append("WPT")
|
||||
if self.bencher:
|
||||
modifier.append("Bencher")
|
||||
|
@ -116,7 +99,7 @@ def handle_preset(s: str) -> Optional[JobConfig]:
|
|||
return JobConfig("OpenHarmony", Workflow.OHOS)
|
||||
elif any(word in s for word in ["webgpu"]):
|
||||
return JobConfig("WebGPU CTS", Workflow.LINUX,
|
||||
wpt_layout=Layout.layout2020, # reftests are mode for new layout
|
||||
wpt=True, # reftests are mode for new layout
|
||||
wpt_args="_webgpu", # run only webgpu cts
|
||||
profile="production", # WebGPU works to slow with debug assert
|
||||
unit_tests=False) # production profile does not work with unit-tests
|
||||
|
@ -138,10 +121,8 @@ def handle_modifier(config: JobConfig, s: str) -> Optional[JobConfig]:
|
|||
config.profile = "production"
|
||||
if "bencher" in s:
|
||||
config.bencher = True
|
||||
elif "wpt-2020" in s:
|
||||
config.wpt_layout = Layout.layout2020
|
||||
elif "wpt" in s:
|
||||
config.wpt_layout = Layout.all()
|
||||
config.wpt = True
|
||||
config.update_name()
|
||||
return config
|
||||
|
||||
|
@ -150,8 +131,6 @@ class Encoder(json.JSONEncoder):
|
|||
def default(self, o):
|
||||
if isinstance(o, (Config, JobConfig)):
|
||||
return o.__dict__
|
||||
if isinstance(o, Layout):
|
||||
return o.to_string()
|
||||
return json.JSONEncoder.default(self, o)
|
||||
|
||||
|
||||
|
@ -176,7 +155,7 @@ class Config(object):
|
|||
self.fail_fast = True
|
||||
continue # skip over keyword
|
||||
if word == "full":
|
||||
words.extend(["linux-unit-tests", "linux-wpt-2020", "linux-bencher"])
|
||||
words.extend(["linux-unit-tests", "linux-wpt", "linux-bencher"])
|
||||
words.extend(["macos-unit-tests", "windows-unit-tests", "android", "ohos", "lint"])
|
||||
continue # skip over keyword
|
||||
if word == "bencher":
|
||||
|
@ -223,7 +202,7 @@ class TestParser(unittest.TestCase):
|
|||
'unit_tests': True,
|
||||
'build_libservo': False,
|
||||
'workflow': 'linux',
|
||||
'wpt_layout': 'none',
|
||||
'wpt': False,
|
||||
'wpt_args': ''
|
||||
}]
|
||||
})
|
||||
|
@ -234,7 +213,7 @@ class TestParser(unittest.TestCase):
|
|||
{
|
||||
"name": "Linux (Unit Tests, WPT, Bencher)",
|
||||
"workflow": "linux",
|
||||
"wpt_layout": "all",
|
||||
"wpt": True,
|
||||
"profile": "release",
|
||||
"unit_tests": True,
|
||||
'build_libservo': False,
|
||||
|
@ -244,7 +223,7 @@ class TestParser(unittest.TestCase):
|
|||
{
|
||||
"name": "MacOS (Unit Tests)",
|
||||
"workflow": "macos",
|
||||
"wpt_layout": "none",
|
||||
"wpt": False,
|
||||
"profile": "release",
|
||||
"unit_tests": True,
|
||||
'build_libservo': False,
|
||||
|
@ -254,7 +233,7 @@ class TestParser(unittest.TestCase):
|
|||
{
|
||||
"name": "Windows (Unit Tests)",
|
||||
"workflow": "windows",
|
||||
"wpt_layout": "none",
|
||||
"wpt": False,
|
||||
"profile": "release",
|
||||
"unit_tests": True,
|
||||
'build_libservo': False,
|
||||
|
@ -264,7 +243,7 @@ class TestParser(unittest.TestCase):
|
|||
{
|
||||
"name": "Android",
|
||||
"workflow": "android",
|
||||
"wpt_layout": "none",
|
||||
"wpt": False,
|
||||
"profile": "release",
|
||||
"unit_tests": False,
|
||||
'build_libservo': False,
|
||||
|
@ -274,7 +253,7 @@ class TestParser(unittest.TestCase):
|
|||
{
|
||||
"name": "OpenHarmony",
|
||||
"workflow": "ohos",
|
||||
"wpt_layout": "none",
|
||||
"wpt": False,
|
||||
"profile": "release",
|
||||
"unit_tests": False,
|
||||
'build_libservo': False,
|
||||
|
@ -284,7 +263,7 @@ class TestParser(unittest.TestCase):
|
|||
{
|
||||
"name": "Lint",
|
||||
"workflow": "lint",
|
||||
"wpt_layout": "none",
|
||||
"wpt": False,
|
||||
"profile": "release",
|
||||
"unit_tests": False,
|
||||
'build_libservo': False,
|
||||
|
@ -293,7 +272,7 @@ class TestParser(unittest.TestCase):
|
|||
]})
|
||||
|
||||
def test_job_merging(self):
|
||||
self.assertDictEqual(json.loads(Config("linux-wpt-2020").to_json()),
|
||||
self.assertDictEqual(json.loads(Config("linux-wpt").to_json()),
|
||||
{'fail_fast': False,
|
||||
'matrix': [{
|
||||
'bencher': False,
|
||||
|
@ -302,7 +281,7 @@ class TestParser(unittest.TestCase):
|
|||
'unit_tests': False,
|
||||
'build_libservo': False,
|
||||
'workflow': 'linux',
|
||||
'wpt_layout': 'all',
|
||||
'wpt': True,
|
||||
'wpt_args': ''
|
||||
}]
|
||||
})
|
||||
|
@ -314,11 +293,11 @@ class TestParser(unittest.TestCase):
|
|||
|
||||
a = handle_preset("linux-unit-tests")
|
||||
a = handle_modifier(a, "linux-unit-tests")
|
||||
b = handle_preset("linux-wpt-2020")
|
||||
b = handle_modifier(b, "linux-wpt-2020")
|
||||
b = handle_preset("linux-wpt")
|
||||
b = handle_modifier(b, "linux-wpt")
|
||||
self.assertTrue(a.merge(b), "Should merge jobs that have different unit test configurations.")
|
||||
self.assertEqual(a, JobConfig("Linux (Unit Tests, WPT)", Workflow.LINUX,
|
||||
unit_tests=True, wpt_layout=Layout.layout2020))
|
||||
unit_tests=True, wpt=True))
|
||||
|
||||
a = JobConfig("Linux (Unit Tests)", Workflow.LINUX, unit_tests=True)
|
||||
b = JobConfig("Mac", Workflow.MACOS, unit_tests=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue