Skip to content

Commit c6b1cf0

Browse files
Brian SheedyChromium LUCI CQ
Brian Sheedy
authored and
Chromium LUCI CQ
committed
Reland "Add WebGPU CTS GPU integration test"
This is a reland of commit c601f46 Changes from original CL: * Updated node.js DEPS entry to download x64/arm64 binaries regardless of host architecture to fix the issue with running tests on arm64 using binaries provided by an x64 machine. Original change's description: > Add WebGPU CTS GPU integration test > > Adds and updates the necessary files to run the WebGPU CTS tests in the > GPU integration test framework. Does not actually enable any tests yet, > as those will be migrated at a later time in chunks. > > Relies on crrev.com/c/3472696 landing first. > > Bug: 1297379 > Change-Id: I41c0cc74dd7a9f01faf6192609fafed9072e0d3a > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3473402 > Reviewed-by: Robbie Iannucci <[email protected]> > Commit-Queue: Brian Sheedy <[email protected]> > Reviewed-by: Austin Eng <[email protected]> > Cr-Commit-Position: refs/heads/main@{#983022} Bug: 1297379, 1308225 Change-Id: I3e76727794722849cc4b8f66590023648262bf48 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3540253 Reviewed-by: Robbie Iannucci <[email protected]> Reviewed-by: Austin Eng <[email protected]> Commit-Queue: Brian Sheedy <[email protected]> Cr-Commit-Position: refs/heads/main@{#983480}
1 parent 65ca15d commit c6b1cf0

32 files changed

+3767
-46
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ vs-chromium-project.txt
215215
/content/test/data/gpu/mediapipe_zip/mediapipe_chromium_tests.zip
216216
/content/test/data/layout_tests/
217217
/content/test/data/plugin/
218+
/content/test/gpu/.webgpu_typescript/
218219
/content/web_ui_test_mojo_bindings.xml
219220
/data
220221
/delegate_execute

.vpython3

+5
Original file line numberDiff line numberDiff line change
@@ -337,6 +337,11 @@ wheel: <
337337
>
338338
>
339339

340+
wheel: <
341+
name: "infra/python/wheels/websockets-py3"
342+
version: "version:10.1"
343+
>
344+
340345
# Used by:
341346
# //tools/infra/find_bad_builds.py
342347
wheel: <

DEPS

+6-2
Original file line numberDiff line numberDiff line change
@@ -4043,10 +4043,14 @@ hooks = [
40434043
'-s', 'src/third_party/node/linux/node-linux-x64.tar.gz.sha1',
40444044
],
40454045
},
4046+
# The Mac x64/arm64 binaries are downloaded regardless of host architecture
4047+
# since it's possible to cross-compile for the other architecture. This can
4048+
# cause problems for tests that use node if the test device architecture does
4049+
# not match the architecture of the compile machine.
40464050
{
40474051
'name': 'node_mac',
40484052
'pattern': '.',
4049-
'condition': 'host_os == "mac" and host_cpu == "x64"',
4053+
'condition': 'host_os == "mac"',
40504054
'action': [ 'python3',
40514055
'src/third_party/depot_tools/download_from_google_storage.py',
40524056
'--no_resume',
@@ -4059,7 +4063,7 @@ hooks = [
40594063
{
40604064
'name': 'node_mac_arm64',
40614065
'pattern': '.',
4062-
'condition': 'host_os == "mac" and host_cpu == "arm64"',
4066+
'condition': 'host_os == "mac"',
40634067
'action': [ 'python3',
40644068
'src/third_party/depot_tools/download_from_google_storage.py',
40654069
'--no_resume',

chrome/test/BUILD.gn

+1
Original file line numberDiff line numberDiff line change
@@ -9972,6 +9972,7 @@ if (!is_android && !is_fuchsia) {
99729972

99739973
data_deps = [
99749974
"//content/test:telemetry_gpu_unittest_data",
9975+
"//content/test:webgpu_cts_scripts",
99759976
"//testing:test_scripts_shared",
99769977
]
99779978
}

content/test/BUILD.gn

+30
Original file line numberDiff line numberDiff line change
@@ -786,13 +786,43 @@ group("telemetry_gpu_integration_test_support") {
786786
":telemetry_gpu_integration_test_data",
787787

788788
# For WebGPU CTS tests.
789+
":webgpu_cts_js",
790+
":webgpu_cts_scripts",
791+
":webgpu_cts_test_page",
789792
"//third_party/dawn/third_party/gn/webgpu-cts",
790793

791794
# For anything using Skia Gold (pixel, maps).
792795
"//ui/base:goldctl",
793796
]
794797
}
795798

799+
# This needs to be copied to the output directory since the CTS tests also
800+
# serve resources that are copied into it.
801+
copy("webgpu_cts_test_page") {
802+
testonly = true
803+
sources = [
804+
"//third_party/blink/web_tests/wpt_internal/webgpu/cts_chrome.https.html",
805+
]
806+
outputs = [ "$target_gen_dir/cts_chrome.https.html" ]
807+
}
808+
809+
copy("webgpu_cts_js") {
810+
testonly = true
811+
sources = [ "//third_party/webgpu-cts/chrome_telemetry.js" ]
812+
outputs = [ "$target_gen_dir/chrome_telemetry.js" ]
813+
}
814+
815+
group("webgpu_cts_scripts") {
816+
testonly = true
817+
data = [
818+
"//third_party/node/",
819+
"//third_party/webgpu-cts/scripts/",
820+
"//third_party/webgpu-cts/src/src/",
821+
"//third_party/webgpu-cts/src/node.tsconfig.json",
822+
"//third_party/webgpu-cts/src/tsconfig.json",
823+
]
824+
}
825+
796826
group("telemetry_gpu_common_data") {
797827
testonly = true
798828
data = [

content/test/gpu/PRESUBMIT.py

+22
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ def CommonChecks(input_api, output_api):
9090
results.extend(input_api.RunTests(pylint_checks))
9191

9292
results.extend(CheckForNewSkipExpectations(input_api, output_api))
93+
results.extend(CheckForWebGpuExpectationSync(input_api, output_api))
9394

9495
return results
9596

@@ -120,6 +121,27 @@ def CheckForNewSkipExpectations(input_api, output_api):
120121
return result
121122

122123

124+
def CheckForWebGpuExpectationSync(input_api, output_api):
125+
"""Enforces that the WebGPU expectations are synced if the CL touched them."""
126+
webgpu_expectations = input_api.os_path.join(input_api.PresubmitLocalPath(),
127+
'gpu_tests', 'test_expectations',
128+
'webgpu_cts_expectations.txt')
129+
file_filter = lambda f: f.AbsoluteLocalPath() == webgpu_expectations
130+
result = []
131+
for _ in input_api.AffectedFiles(file_filter=file_filter):
132+
check = input_api.Command(name='check_webgpu_expectation_sync',
133+
cmd=[
134+
input_api.python3_executable,
135+
'process_generated_webgpu_expectations.py',
136+
'validate'
137+
],
138+
kwargs={},
139+
message=output_api.PresubmitError,
140+
python3=True)
141+
result.extend(input_api.RunTests([check]))
142+
return result
143+
144+
123145
def CheckChangeOnUpload(input_api, output_api):
124146
return CommonChecks(input_api, output_api)
125147

content/test/gpu/gpu_path_util/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
GPU_DATA_RELATIVE_PATH = os.path.join(*_GPU_DATA_RELATIVE_PATH_COMPONENTS)
1616
GPU_DATA_DIR = os.path.join(CHROMIUM_SRC_DIR,
1717
*_GPU_DATA_RELATIVE_PATH_COMPONENTS)
18+
GPU_EXPECTATIONS_DIR = os.path.join(GPU_DIR, 'gpu_tests', 'test_expectations')
1819

1920
TOOLS_PERF_DIR = os.path.join(CHROMIUM_SRC_DIR, 'tools', 'perf')
2021

content/test/gpu/gpu_tests/test_expectations/context_lost_expectations.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
# tags: [ display-server-wayland display-server-x ]
5555
# OOP-Canvas
5656
# tags: [ oop-c no-oop-c ]
57-
# results: [ Failure RetryOnFailure Skip ]
57+
# WebGPU Backend Validation
58+
# tags: [ dawn-backend-validation dawn-no-backend-validation ]
59+
# results: [ Failure RetryOnFailure Skip Slow ]
5860
# END TAG HEADER
5961

6062
###############################

content/test/gpu/gpu_tests/test_expectations/gpu_process_expectations.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
# tags: [ display-server-wayland display-server-x ]
5555
# OOP-Canvas
5656
# tags: [ oop-c no-oop-c ]
57-
# results: [ Failure RetryOnFailure Skip ]
57+
# WebGPU Backend Validation
58+
# tags: [ dawn-backend-validation dawn-no-backend-validation ]
59+
# results: [ Failure RetryOnFailure Skip Slow ]
5860
# END TAG HEADER
5961

6062
###############################

content/test/gpu/gpu_tests/test_expectations/hardware_accelerated_feature_expectations.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
# tags: [ display-server-wayland display-server-x ]
5555
# OOP-Canvas
5656
# tags: [ oop-c no-oop-c ]
57-
# results: [ Failure RetryOnFailure Skip ]
57+
# WebGPU Backend Validation
58+
# tags: [ dawn-backend-validation dawn-no-backend-validation ]
59+
# results: [ Failure RetryOnFailure Skip Slow ]
5860
# END TAG HEADER
5961

6062
###############################

content/test/gpu/gpu_tests/test_expectations/info_collection_expectations.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
# tags: [ display-server-wayland display-server-x ]
5555
# OOP-Canvas
5656
# tags: [ oop-c no-oop-c ]
57-
# results: [ Failure RetryOnFailure Skip ]
57+
# WebGPU Backend Validation
58+
# tags: [ dawn-backend-validation dawn-no-backend-validation ]
59+
# results: [ Failure RetryOnFailure Skip Slow ]
5860
# END TAG HEADER
5961

6062
###############################

content/test/gpu/gpu_tests/test_expectations/maps_expectations.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
# tags: [ display-server-wayland display-server-x ]
5555
# OOP-Canvas
5656
# tags: [ oop-c no-oop-c ]
57-
# results: [ Failure RetryOnFailure Skip ]
57+
# WebGPU Backend Validation
58+
# tags: [ dawn-backend-validation dawn-no-backend-validation ]
59+
# results: [ Failure RetryOnFailure Skip Slow ]
5860
# END TAG HEADER
5961

6062
###############################

content/test/gpu/gpu_tests/test_expectations/mediapipe_expectations.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
# tags: [ display-server-wayland display-server-x ]
5555
# OOP-Canvas
5656
# tags: [ oop-c no-oop-c ]
57-
# results: [ Failure RetryOnFailure Skip ]
57+
# WebGPU Backend Validation
58+
# tags: [ dawn-backend-validation dawn-no-backend-validation ]
59+
# results: [ Failure RetryOnFailure Skip Slow ]
5860
# END TAG HEADER
5961

6062
###############################

content/test/gpu/gpu_tests/test_expectations/pixel_expectations.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
# tags: [ display-server-wayland display-server-x ]
5555
# OOP-Canvas
5656
# tags: [ oop-c no-oop-c ]
57-
# results: [ Failure RetryOnFailure Skip ]
57+
# WebGPU Backend Validation
58+
# tags: [ dawn-backend-validation dawn-no-backend-validation ]
59+
# results: [ Failure RetryOnFailure Skip Slow ]
5860
# END TAG HEADER
5961

6062
###############################

content/test/gpu/gpu_tests/test_expectations/power_measurement_expectations.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
# tags: [ display-server-wayland display-server-x ]
5555
# OOP-Canvas
5656
# tags: [ oop-c no-oop-c ]
57-
# results: [ Failure RetryOnFailure Skip ]
57+
# WebGPU Backend Validation
58+
# tags: [ dawn-backend-validation dawn-no-backend-validation ]
59+
# results: [ Failure RetryOnFailure Skip Slow ]
5860
# END TAG HEADER
5961

6062
###############################

content/test/gpu/gpu_tests/test_expectations/screenshot_sync_expectations.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
# tags: [ display-server-wayland display-server-x ]
5555
# OOP-Canvas
5656
# tags: [ oop-c no-oop-c ]
57-
# results: [ Failure RetryOnFailure Skip ]
57+
# WebGPU Backend Validation
58+
# tags: [ dawn-backend-validation dawn-no-backend-validation ]
59+
# results: [ Failure RetryOnFailure Skip Slow ]
5860
# END TAG HEADER
5961

6062
###############################

content/test/gpu/gpu_tests/test_expectations/trace_test_expectations.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
# tags: [ display-server-wayland display-server-x ]
5555
# OOP-Canvas
5656
# tags: [ oop-c no-oop-c ]
57-
# results: [ Failure RetryOnFailure Skip ]
57+
# WebGPU Backend Validation
58+
# tags: [ dawn-backend-validation dawn-no-backend-validation ]
59+
# results: [ Failure RetryOnFailure Skip Slow ]
5860
# END TAG HEADER
5961

6062
###############################

content/test/gpu/gpu_tests/test_expectations/webcodecs_expectations.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
# tags: [ display-server-wayland display-server-x ]
5555
# OOP-Canvas
5656
# tags: [ oop-c no-oop-c ]
57-
# results: [ Failure RetryOnFailure Skip ]
57+
# WebGPU Backend Validation
58+
# tags: [ dawn-backend-validation dawn-no-backend-validation ]
59+
# results: [ Failure RetryOnFailure Skip Slow ]
5860
# END TAG HEADER
5961

6062
###############################

content/test/gpu/gpu_tests/test_expectations/webgl2_conformance_expectations.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
# tags: [ display-server-wayland display-server-x ]
5555
# OOP-Canvas
5656
# tags: [ oop-c no-oop-c ]
57-
# results: [ Failure RetryOnFailure Skip ]
57+
# WebGPU Backend Validation
58+
# tags: [ dawn-backend-validation dawn-no-backend-validation ]
59+
# results: [ Failure RetryOnFailure Skip Slow ]
5860
# END TAG HEADER
5961

6062
###############################

content/test/gpu/gpu_tests/test_expectations/webgl_conformance_expectations.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
# tags: [ display-server-wayland display-server-x ]
5555
# OOP-Canvas
5656
# tags: [ oop-c no-oop-c ]
57-
# results: [ Failure RetryOnFailure Skip ]
57+
# WebGPU Backend Validation
58+
# tags: [ dawn-backend-validation dawn-no-backend-validation ]
59+
# results: [ Failure RetryOnFailure Skip Slow ]
5860
# END TAG HEADER
5961

6062
###############################

0 commit comments

Comments
 (0)