mirror of
https://github.com/servo/servo.git
synced 2025-08-04 13:10:20 +01:00
wpt-tests-to-run -> wpt-args and make them last so they can override already provide (#33115)
d options Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
This commit is contained in:
parent
84b5b64424
commit
b5fe99ba5d
8 changed files with 32 additions and 31 deletions
6
.github/workflows/dispatch-workflow.yml
vendored
6
.github/workflows/dispatch-workflow.yml
vendored
|
@ -8,7 +8,7 @@ on:
|
||||||
profile:
|
profile:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
wpt-tests-to-run:
|
wpt-args:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
wpt-layout:
|
wpt-layout:
|
||||||
|
@ -37,7 +37,7 @@ jobs:
|
||||||
profile: ${{ inputs.profile }}
|
profile: ${{ inputs.profile }}
|
||||||
wpt-layout: ${{ inputs.wpt-layout }}
|
wpt-layout: ${{ inputs.wpt-layout }}
|
||||||
unit-tests: ${{ inputs.unit-tests }}
|
unit-tests: ${{ inputs.unit-tests }}
|
||||||
wpt-tests-to-run: ${{ inputs.wpt-tests-to-run }}
|
wpt-args: ${{ inputs.wpt-args }}
|
||||||
|
|
||||||
linux:
|
linux:
|
||||||
if: ${{ inputs.workflow == 'linux' }}
|
if: ${{ inputs.workflow == 'linux' }}
|
||||||
|
@ -48,7 +48,7 @@ jobs:
|
||||||
profile: ${{ inputs.profile }}
|
profile: ${{ inputs.profile }}
|
||||||
wpt-layout: ${{ inputs.wpt-layout }}
|
wpt-layout: ${{ inputs.wpt-layout }}
|
||||||
unit-tests: ${{ inputs.unit-tests }}
|
unit-tests: ${{ inputs.unit-tests }}
|
||||||
wpt-tests-to-run: ${{ inputs.wpt-tests-to-run }}
|
wpt-args: ${{ inputs.wpt-args }}
|
||||||
|
|
||||||
android:
|
android:
|
||||||
if: ${{ inputs.workflow == 'android' }}
|
if: ${{ inputs.workflow == 'android' }}
|
||||||
|
|
6
.github/workflows/linux-wpt.yml
vendored
6
.github/workflows/linux-wpt.yml
vendored
|
@ -5,7 +5,7 @@ on:
|
||||||
profile:
|
profile:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
wpt-tests-to-run:
|
wpt-args:
|
||||||
default: ""
|
default: ""
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
@ -67,13 +67,13 @@ jobs:
|
||||||
python3 ./mach test-wpt \
|
python3 ./mach test-wpt \
|
||||||
$WPT_LAYOUT_ARG \
|
$WPT_LAYOUT_ARG \
|
||||||
$WPT_ALWAYS_SUCCEED_ARG \
|
$WPT_ALWAYS_SUCCEED_ARG \
|
||||||
${{ inputs.wpt-tests-to-run }} \
|
|
||||||
--${{ inputs.profile }} --processes $(nproc) --timeout-multiplier 2 \
|
--${{ inputs.profile }} --processes $(nproc) --timeout-multiplier 2 \
|
||||||
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
|
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
|
||||||
--log-raw wpt-full-logs/linux-${{ inputs.wpt-layout }}/raw/${{ matrix.chunk_id }}.log \
|
--log-raw wpt-full-logs/linux-${{ inputs.wpt-layout }}/raw/${{ matrix.chunk_id }}.log \
|
||||||
--log-wptreport wpt-full-logs/linux-${{ inputs.wpt-layout }}/wptreport/${{ matrix.chunk_id }}.json \
|
--log-wptreport wpt-full-logs/linux-${{ inputs.wpt-layout }}/wptreport/${{ matrix.chunk_id }}.json \
|
||||||
--log-raw-unexpected wpt-filtered-logs/linux-${{ inputs.wpt-layout }}/${{ matrix.chunk_id }}.log \
|
--log-raw-unexpected wpt-filtered-logs/linux-${{ inputs.wpt-layout }}/${{ matrix.chunk_id }}.log \
|
||||||
--filter-intermittents wpt-filtered-logs/linux-${{ inputs.wpt-layout }}/${{ matrix.chunk_id }}.json
|
--filter-intermittents wpt-filtered-logs/linux-${{ inputs.wpt-layout }}/${{ matrix.chunk_id }}.json \
|
||||||
|
${{ inputs.wpt-args }}
|
||||||
env:
|
env:
|
||||||
GITHUB_CONTEXT: ${{ toJson(github) }}
|
GITHUB_CONTEXT: ${{ toJson(github) }}
|
||||||
- name: Archive results (filtered)
|
- name: Archive results (filtered)
|
||||||
|
|
8
.github/workflows/linux.yml
vendored
8
.github/workflows/linux.yml
vendored
|
@ -6,7 +6,7 @@ on:
|
||||||
required: false
|
required: false
|
||||||
default: "release"
|
default: "release"
|
||||||
type: string
|
type: string
|
||||||
wpt-tests-to-run:
|
wpt-args:
|
||||||
default: ""
|
default: ""
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
@ -35,7 +35,7 @@ on:
|
||||||
default: "release"
|
default: "release"
|
||||||
type: choice
|
type: choice
|
||||||
options: ["release", "debug", "production"]
|
options: ["release", "debug", "production"]
|
||||||
wpt-tests-to-run:
|
wpt-args:
|
||||||
default: ""
|
default: ""
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
@ -161,7 +161,7 @@ jobs:
|
||||||
needs: ["build"]
|
needs: ["build"]
|
||||||
uses: ./.github/workflows/linux-wpt.yml
|
uses: ./.github/workflows/linux-wpt.yml
|
||||||
with:
|
with:
|
||||||
wpt-tests-to-run: ${{ inputs.wpt-tests-to-run }}
|
wpt-args: ${{ inputs.wpt-args }}
|
||||||
profile: ${{ inputs.profile }}
|
profile: ${{ inputs.profile }}
|
||||||
wpt-sync-from-upstream: ${{ inputs.wpt-sync-from-upstream }}
|
wpt-sync-from-upstream: ${{ inputs.wpt-sync-from-upstream }}
|
||||||
wpt-layout: "layout-2020"
|
wpt-layout: "layout-2020"
|
||||||
|
@ -173,7 +173,7 @@ jobs:
|
||||||
needs: ["build"]
|
needs: ["build"]
|
||||||
uses: ./.github/workflows/linux-wpt.yml
|
uses: ./.github/workflows/linux-wpt.yml
|
||||||
with:
|
with:
|
||||||
wpt-tests-to-run: ${{ inputs.wpt-tests-to-run }}
|
wpt-args: ${{ inputs.wpt-args }}
|
||||||
profile: ${{ inputs.profile }}
|
profile: ${{ inputs.profile }}
|
||||||
wpt-sync-from-upstream: ${{ inputs.wpt-sync-from-upstream }}
|
wpt-sync-from-upstream: ${{ inputs.wpt-sync-from-upstream }}
|
||||||
wpt-layout: "layout-2013"
|
wpt-layout: "layout-2013"
|
||||||
|
|
5
.github/workflows/mac-wpt.yml
vendored
5
.github/workflows/mac-wpt.yml
vendored
|
@ -3,7 +3,7 @@ name: Mac WPT Tests
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
wpt-tests-to-run:
|
wpt-args:
|
||||||
default: ""
|
default: ""
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
@ -52,12 +52,13 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
mkdir -p wpt-filtered-logs/macos-${{ inputs.wpt-layout }}
|
mkdir -p wpt-filtered-logs/macos-${{ inputs.wpt-layout }}
|
||||||
mkdir -p wpt-full-logs/macos-${{ inputs.wpt-layout }}
|
mkdir -p wpt-full-logs/macos-${{ inputs.wpt-layout }}
|
||||||
python3 ./mach test-wpt $WPT_COMMAND_LINE_ARG ${{ inputs.wpt-tests-to-run }} \
|
python3 ./mach test-wpt $WPT_COMMAND_LINE_ARG \
|
||||||
--${{ inputs.profile }} --processes $(sysctl -n hw.logicalcpu) --timeout-multiplier 8 \
|
--${{ inputs.profile }} --processes $(sysctl -n hw.logicalcpu) --timeout-multiplier 8 \
|
||||||
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
|
--total-chunks ${{ env.max_chunk_id }} --this-chunk ${{ matrix.chunk_id }} \
|
||||||
--log-raw wpt-full-logs/macos-${{ inputs.wpt-layout }}/${{ matrix.chunk_id }}.log \
|
--log-raw wpt-full-logs/macos-${{ inputs.wpt-layout }}/${{ matrix.chunk_id }}.log \
|
||||||
--log-raw-unexpected wpt-filtered-logs/macos-${{ inputs.wpt-layout }}/${{ matrix.chunk_id }}.log \
|
--log-raw-unexpected wpt-filtered-logs/macos-${{ inputs.wpt-layout }}/${{ matrix.chunk_id }}.log \
|
||||||
--filter-intermittents wpt-filtered-logs/macos-${{ inputs.wpt-layout }}/${{ matrix.chunk_id }}.json
|
--filter-intermittents wpt-filtered-logs/macos-${{ inputs.wpt-layout }}/${{ matrix.chunk_id }}.json
|
||||||
|
${{ inputs.wpt-args }}
|
||||||
- name: Archive results (filtered)
|
- name: Archive results (filtered)
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
|
|
8
.github/workflows/mac.yml
vendored
8
.github/workflows/mac.yml
vendored
|
@ -7,7 +7,7 @@ on:
|
||||||
required: false
|
required: false
|
||||||
default: "release"
|
default: "release"
|
||||||
type: string
|
type: string
|
||||||
wpt-tests-to-run:
|
wpt-args:
|
||||||
default: ""
|
default: ""
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
@ -32,7 +32,7 @@ on:
|
||||||
default: "release"
|
default: "release"
|
||||||
type: choice
|
type: choice
|
||||||
options: ["release", "debug", "production"]
|
options: ["release", "debug", "production"]
|
||||||
wpt-tests-to-run:
|
wpt-args:
|
||||||
default: ""
|
default: ""
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
@ -158,7 +158,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
profile: ${{ inputs.profile }}
|
profile: ${{ inputs.profile }}
|
||||||
wpt-layout: "layout-2020"
|
wpt-layout: "layout-2020"
|
||||||
wpt-tests-to-run: ${{ inputs.wpt-tests-to-run }}
|
wpt-args: ${{ inputs.wpt-args }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
wpt-2013:
|
wpt-2013:
|
||||||
|
@ -169,5 +169,5 @@ jobs:
|
||||||
with:
|
with:
|
||||||
profile: ${{ inputs.profile }}
|
profile: ${{ inputs.profile }}
|
||||||
wpt-layout: "layout-2013"
|
wpt-layout: "layout-2013"
|
||||||
wpt-tests-to-run: ${{ inputs.wpt-tests-to-run }}
|
wpt-args: ${{ inputs.wpt-args }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
2
.github/workflows/try-label.yml
vendored
2
.github/workflows/try-label.yml
vendored
|
@ -136,7 +136,7 @@ jobs:
|
||||||
wpt-layout: ${{ matrix.wpt_layout }}
|
wpt-layout: ${{ matrix.wpt_layout }}
|
||||||
profile: ${{ matrix.profile }}
|
profile: ${{ matrix.profile }}
|
||||||
unit-tests: ${{ matrix.unit_tests }}
|
unit-tests: ${{ matrix.unit_tests }}
|
||||||
wpt-tests-to-run: ${{ matrix.wpt_tests_to_run }}
|
wpt-args: ${{ matrix.wpt_args }}
|
||||||
|
|
||||||
results:
|
results:
|
||||||
name: Results
|
name: Results
|
||||||
|
|
6
.github/workflows/try.yml
vendored
6
.github/workflows/try.yml
vendored
|
@ -10,7 +10,7 @@ on:
|
||||||
default: "release"
|
default: "release"
|
||||||
type: choice
|
type: choice
|
||||||
options: ["release", "debug", "production"]
|
options: ["release", "debug", "production"]
|
||||||
wpt-tests-to-run:
|
wpt-args:
|
||||||
default: ""
|
default: ""
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
@ -75,7 +75,7 @@ jobs:
|
||||||
if (context.eventName == "workflow_dispatch") {
|
if (context.eventName == "workflow_dispatch") {
|
||||||
// WPT-related overrides only affect Linux currently, as tests don't run by default on other platforms.
|
// 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_layout = "${{ inputs.wpt-layout }}" || "none";
|
||||||
configuration.matrix[0].wpt_tests_to_run = "${{ inputs.wpt-tests-to-run }}" || "";
|
configuration.matrix[0].wpt_args = "${{ inputs.wpt-args }}" || "";
|
||||||
|
|
||||||
let unit_tests = Boolean(${{ inputs.unit-tests }});
|
let unit_tests = Boolean(${{ inputs.unit-tests }});
|
||||||
let profile = '${{ inputs.profile }}';
|
let profile = '${{ inputs.profile }}';
|
||||||
|
@ -103,7 +103,7 @@ jobs:
|
||||||
wpt-layout: ${{ matrix.wpt_layout }}
|
wpt-layout: ${{ matrix.wpt_layout }}
|
||||||
profile: ${{ matrix.profile }}
|
profile: ${{ matrix.profile }}
|
||||||
unit-tests: ${{ matrix.unit_tests }}
|
unit-tests: ${{ matrix.unit_tests }}
|
||||||
wpt-tests-to-run: ${{ matrix.wpt_tests_to_run }}
|
wpt-args: ${{ matrix.wpt_args }}
|
||||||
|
|
||||||
build-result:
|
build-result:
|
||||||
name: Result
|
name: Result
|
||||||
|
|
|
@ -56,10 +56,10 @@ class JobConfig(object):
|
||||||
wpt_layout: Layout = Layout.none
|
wpt_layout: Layout = Layout.none
|
||||||
profile: str = "release"
|
profile: str = "release"
|
||||||
unit_tests: bool = False
|
unit_tests: bool = False
|
||||||
wpt_tests_to_run: str = ""
|
wpt_args: str = ""
|
||||||
# These are the fields that must match in between two JobConfigs for them to be able to be
|
# These are the fields that must match in between two JobConfigs for them to be able to be
|
||||||
# merged. If you modify any of the fields above, make sure to update this line as well.
|
# merged. If you modify any of the fields above, make sure to update this line as well.
|
||||||
merge_compatibility_fields: ClassVar[List[str]] = ['workflow', 'profile', 'wpt_tests_to_run']
|
merge_compatibility_fields: ClassVar[List[str]] = ['workflow', 'profile', 'wpt_args']
|
||||||
|
|
||||||
def merge(self, other: JobConfig) -> bool:
|
def merge(self, other: JobConfig) -> bool:
|
||||||
"""Try to merge another job with this job. Returns True if merging is successful
|
"""Try to merge another job with this job. Returns True if merging is successful
|
||||||
|
@ -101,7 +101,7 @@ def handle_preset(s: str) -> Optional[JobConfig]:
|
||||||
elif s == "webgpu":
|
elif s == "webgpu":
|
||||||
return JobConfig("WebGPU CTS", Workflow.LINUX,
|
return JobConfig("WebGPU CTS", Workflow.LINUX,
|
||||||
wpt_layout=Layout.layout2020, # reftests are mode for new layout
|
wpt_layout=Layout.layout2020, # reftests are mode for new layout
|
||||||
wpt_tests_to_run="_webgpu", # run only webgpu cts
|
wpt_args="_webgpu", # run only webgpu cts
|
||||||
profile="production", # WebGPU works to slow with debug assert
|
profile="production", # WebGPU works to slow with debug assert
|
||||||
unit_tests=False) # production profile does not work with unit-tests
|
unit_tests=False) # production profile does not work with unit-tests
|
||||||
else:
|
else:
|
||||||
|
@ -176,7 +176,7 @@ class TestParser(unittest.TestCase):
|
||||||
'unit_tests': True,
|
'unit_tests': True,
|
||||||
'workflow': 'linux',
|
'workflow': 'linux',
|
||||||
'wpt_layout': 'none',
|
'wpt_layout': 'none',
|
||||||
'wpt_tests_to_run': ''
|
'wpt_args': ''
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@ class TestParser(unittest.TestCase):
|
||||||
"wpt_layout": "all",
|
"wpt_layout": "all",
|
||||||
"profile": "release",
|
"profile": "release",
|
||||||
"unit_tests": True,
|
"unit_tests": True,
|
||||||
"wpt_tests_to_run": ""
|
"wpt_args": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "MacOS",
|
"name": "MacOS",
|
||||||
|
@ -197,7 +197,7 @@ class TestParser(unittest.TestCase):
|
||||||
"wpt_layout": "none",
|
"wpt_layout": "none",
|
||||||
"profile": "release",
|
"profile": "release",
|
||||||
"unit_tests": True,
|
"unit_tests": True,
|
||||||
"wpt_tests_to_run": ""
|
"wpt_args": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Windows",
|
"name": "Windows",
|
||||||
|
@ -205,7 +205,7 @@ class TestParser(unittest.TestCase):
|
||||||
"wpt_layout": "none",
|
"wpt_layout": "none",
|
||||||
"profile": "release",
|
"profile": "release",
|
||||||
"unit_tests": True,
|
"unit_tests": True,
|
||||||
"wpt_tests_to_run": ""
|
"wpt_args": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "Android",
|
"name": "Android",
|
||||||
|
@ -213,7 +213,7 @@ class TestParser(unittest.TestCase):
|
||||||
"wpt_layout": "none",
|
"wpt_layout": "none",
|
||||||
"profile": "release",
|
"profile": "release",
|
||||||
"unit_tests": False,
|
"unit_tests": False,
|
||||||
"wpt_tests_to_run": ""
|
"wpt_args": ""
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "OpenHarmony",
|
"name": "OpenHarmony",
|
||||||
|
@ -221,7 +221,7 @@ class TestParser(unittest.TestCase):
|
||||||
"wpt_layout": "none",
|
"wpt_layout": "none",
|
||||||
"profile": "release",
|
"profile": "release",
|
||||||
"unit_tests": False,
|
"unit_tests": False,
|
||||||
"wpt_tests_to_run": ""
|
"wpt_args": ""
|
||||||
}
|
}
|
||||||
]})
|
]})
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ class TestParser(unittest.TestCase):
|
||||||
'unit_tests': False,
|
'unit_tests': False,
|
||||||
'workflow': 'linux',
|
'workflow': 'linux',
|
||||||
'wpt_layout': 'all',
|
'wpt_layout': 'all',
|
||||||
'wpt_tests_to_run': ''
|
'wpt_args': ''
|
||||||
}]
|
}]
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -254,7 +254,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))
|
||||||
|
|
||||||
a = JobConfig("Linux", Workflow.LINUX, unit_tests=True)
|
a = JobConfig("Linux", Workflow.LINUX, unit_tests=True)
|
||||||
b = JobConfig("Linux", Workflow.LINUX, unit_tests=True, wpt_tests_to_run="/css")
|
b = JobConfig("Linux", Workflow.LINUX, unit_tests=True, wpt_args="/css")
|
||||||
self.assertFalse(a.merge(b), "Should not merge jobs that run different WPT tests.")
|
self.assertFalse(a.merge(b), "Should not merge jobs that run different WPT tests.")
|
||||||
self.assertEqual(a, JobConfig("Linux", Workflow.LINUX, unit_tests=True))
|
self.assertEqual(a, JobConfig("Linux", Workflow.LINUX, unit_tests=True))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue