Skip to content

Commit 3aafa54

Browse files
bsheedy-workDawn LUCI CQ
authored andcommitted
Add new standalone GN args and test specs
Adds the necessary new code to support Dawn-side GN args and test specs for the upcoming Dawn standalone builders which use the gn_v2 recipe. Additionally, adds the GN args and test specs used by the Linux/Swiftshader configuration to act as an example and make future testing via led easier. This does NOT actually create the builders yet, as they are not added to //infra/config/global/main.star yet. Bug: 385317083 Change-Id: Ibc08f4a834c67707b7bd594a9b610f05cb44d1a9 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/230894 Reviewed-by: Yuly Novikov <[email protected]> Reviewed-by: Antonio Maiorano <[email protected]> Reviewed-by: dan sinclair <[email protected]> Commit-Queue: Brian Sheedy <[email protected]>
1 parent e0070b4 commit 3aafa54

File tree

15 files changed

+730
-0
lines changed

15 files changed

+730
-0
lines changed

.gitmodules

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
path = tools/clang
3535
url = https://chromium.googlesource.com/chromium/src/tools/clang
3636
gclient-condition = dawn_standalone
37+
[submodule "tools/mb"]
38+
path = tools/mb
39+
url = https://chromium.googlesource.com/chromium/src/tools/mb
40+
gclient-condition = dawn_standalone
3741
[submodule "testing"]
3842
path = testing
3943
url = https://chromium.googlesource.com/chromium/src/testing

.vpython3

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This is a vpython "spec" file.
2+
#
3+
# It describes patterns for python wheel dependencies of the python scripts in
4+
# the chromium repo, particularly for dependencies that have compiled components
5+
# (since pure-python dependencies can be easily vendored into third_party).
6+
#
7+
# When vpython is invoked, it finds this file and builds a python VirtualEnv,
8+
# containing all of the dependencies described in this file, fetching them from
9+
# CIPD (the "Chrome Infrastructure Package Deployer" service). Unlike `pip`,
10+
# this never requires the end-user machine to have a working python extension
11+
# compilation environment. All of these packages are built using:
12+
# https://chromium.googlesource.com/infra/infra/+/master/infra/tools/dockerbuild/
13+
#
14+
# All python scripts in the repo share this same spec, to avoid dependency
15+
# fragmentation.
16+
#
17+
# If you have depot_tools installed in your $PATH, you can invoke python scripts
18+
# in this repo by running them as you normally would run them, except
19+
# substituting `vpython` instead of `python` on the command line, e.g.:
20+
# vpython path/to/script.py some --arguments
21+
#
22+
# Read more about `vpython` and how to modify this file here:
23+
# https://chromium.googlesource.com/infra/infra/+/master/doc/users/vpython.md
24+
25+
python_version: "3.11"
26+
27+
# The default set of platforms vpython checks does not yet include mac-arm64.
28+
# Setting `verify_pep425_tag` to the list of platforms we explicitly must support
29+
# allows us to ensure that vpython specs stay mac-arm64-friendly
30+
verify_pep425_tag: [
31+
{python: "cp311", abi: "cp311", platform: "manylinux1_x86_64"},
32+
{python: "cp311", abi: "cp311", platform: "linux_arm64"},
33+
34+
{python: "cp311", abi: "cp311", platform: "macosx_10_10_intel"},
35+
{python: "cp311", abi: "cp311", platform: "macosx_11_0_arm64"},
36+
37+
{python: "cp311", abi: "cp311", platform: "win32"},
38+
{python: "cp311", abi: "cp311", platform: "win_amd64"}
39+
]
40+
41+
# Needed by testing/xvfb.py
42+
wheel: <
43+
name: "infra/python/wheels/psutil/${vpython_platform}"
44+
version: "version:5.8.0.chromium.3"
45+
>

DEPS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,11 @@ deps = {
220220
],
221221
},
222222

223+
# Used for Dawn-side GN arg definitions.
224+
'tools/mb': {
225+
'url': '{chromium_git}/chromium/src/tools/mb@61f390a8b5da670b755e021a9ec0c2cac3de840e',
226+
'condition': 'dawn_standalone',
227+
},
223228

224229
# Testing, GTest and GMock
225230
'testing': {

infra/specs/OWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+

infra/specs/PRESUBMIT.py

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Copyright 2025 The Dawn & Tint Authors
2+
#
3+
# Redistribution and use in source and binary forms, with or without
4+
# modification, are permitted provided that the following conditions are met:
5+
#
6+
# 1. Redistributions of source code must retain the above copyright notice, this
7+
# list of conditions and the following disclaimer.
8+
#
9+
# 2. Redistributions in binary form must reproduce the above copyright notice,
10+
# this list of conditions and the following disclaimer in the documentation
11+
# and/or other materials provided with the distribution.
12+
#
13+
# 3. Neither the name of the copyright holder nor the names of its
14+
# contributors may be used to endorse or promote products derived from
15+
# this software without specific prior written permission.
16+
#
17+
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
18+
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19+
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
21+
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22+
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
23+
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
24+
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
25+
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
26+
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27+
"""
28+
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
29+
for more details on the presubmit API built into depot_tools.
30+
"""
31+
32+
PRESUBMIT_VERSION = '2.0.0'
33+
34+
35+
def CheckGeneratedJsonUpToDate(input_api, output_api):
36+
"""Verifies that generated JSON files match .pyl contents."""
37+
command = input_api.Command(name='validate_generated_json',
38+
cmd=[
39+
input_api.python3_executable,
40+
'generate_test_spec_json.py',
41+
'--verify-only',
42+
],
43+
kwargs={},
44+
message=output_api.PresubmitError)
45+
return input_api.RunTests([command])

infra/specs/dawn.json

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
{
2+
"AAAAA1 AUTOGENERATED FILE DO NOT EDIT": {},
3+
"AAAAA2 See generate_buildbot_json.py to make changes": {},
4+
"dawn-linux-x64-sws-rel": {
5+
"gtest_tests": [
6+
{
7+
"args": [
8+
"--backend=opengles",
9+
"--use-angle=swiftshader",
10+
"--enable-toggles=gl_force_es_31_and_no_extensions"
11+
],
12+
"merge": {
13+
"script": "//testing/merge_scripts/noop_merge.py"
14+
},
15+
"name": "dawn_end2end_swangle_tests",
16+
"resultdb": {
17+
"result_format": "gtest_json"
18+
},
19+
"swarming": {
20+
"containment_type": "AUTO",
21+
"dimensions": {
22+
"cpu": "x86-64",
23+
"gpu": "none",
24+
"os": "Ubuntu-22.04",
25+
"pool": "chromium.tests.gpu"
26+
},
27+
"service_account": "[email protected]"
28+
},
29+
"test": "dawn_end2end_tests",
30+
"test_id_prefix": "ninja://src/dawn/tests:dawn_end2end_tests/"
31+
},
32+
{
33+
"args": [
34+
"--adapter-vendor-id=0x1AE0"
35+
],
36+
"merge": {
37+
"script": "//testing/merge_scripts/noop_merge.py"
38+
},
39+
"name": "dawn_end2end_sws_tests",
40+
"resultdb": {
41+
"result_format": "gtest_json"
42+
},
43+
"swarming": {
44+
"containment_type": "AUTO",
45+
"dimensions": {
46+
"cpu": "x86-64",
47+
"gpu": "none",
48+
"os": "Ubuntu-22.04",
49+
"pool": "chromium.tests.gpu"
50+
},
51+
"service_account": "[email protected]"
52+
},
53+
"test": "dawn_end2end_tests",
54+
"test_id_prefix": "ninja://src/dawn/tests:dawn_end2end_tests/"
55+
},
56+
{
57+
"merge": {
58+
"script": "//testing/merge_scripts/noop_merge.py"
59+
},
60+
"name": "dawn_unittests",
61+
"resultdb": {
62+
"result_format": "gtest_json"
63+
},
64+
"swarming": {
65+
"containment_type": "AUTO",
66+
"dimensions": {
67+
"cpu": "x86-64",
68+
"gpu": "none",
69+
"os": "Ubuntu-22.04",
70+
"pool": "chromium.tests.gpu"
71+
},
72+
"service_account": "[email protected]"
73+
},
74+
"test": "dawn_unittests",
75+
"test_id_prefix": "ninja://src/dawn/tests:dawn_unittests/"
76+
},
77+
{
78+
"args": [
79+
"--use-wire"
80+
],
81+
"merge": {
82+
"script": "//testing/merge_scripts/noop_merge.py"
83+
},
84+
"name": "dawn_wire_unittests",
85+
"resultdb": {
86+
"result_format": "gtest_json"
87+
},
88+
"swarming": {
89+
"containment_type": "AUTO",
90+
"dimensions": {
91+
"cpu": "x86-64",
92+
"gpu": "none",
93+
"os": "Ubuntu-22.04",
94+
"pool": "chromium.tests.gpu"
95+
},
96+
"service_account": "[email protected]"
97+
},
98+
"test": "dawn_unittests",
99+
"test_id_prefix": "ninja://src/dawn/tests:dawn_unittests/"
100+
},
101+
{
102+
"merge": {
103+
"script": "//testing/merge_scripts/noop_merge.py"
104+
},
105+
"name": "tint_unittests",
106+
"resultdb": {
107+
"result_format": "gtest_json"
108+
},
109+
"swarming": {
110+
"containment_type": "AUTO",
111+
"dimensions": {
112+
"cpu": "x86-64",
113+
"gpu": "none",
114+
"os": "Ubuntu-22.04",
115+
"pool": "chromium.tests.gpu"
116+
},
117+
"service_account": "[email protected]"
118+
},
119+
"test": "tint_unittests",
120+
"test_id_prefix": "ninja://src/tint/cmd/test:tint_unittests/"
121+
}
122+
]
123+
}
124+
}

0 commit comments

Comments
 (0)