Skip to content

Commit

Permalink
Bug 1720941, part 1: build(ci): integrate WebGPU CTS into CI r=webgpu…
Browse files Browse the repository at this point in the history
…-reviewers,taskgraph-reviewers,jmaher,jimb

Vendor in WebGPU CTS so that we can run it against our implementation of WebGPU. This patch includes:

1. Some linting configuration tweaks, to silence issues that weren't straightforward to fix in CTS upstream.
2. Some WPT runner configuration to enable preferences, and skip MacOS testing altogether (since it's not targeted by our current work).
3. A new Rust binary crate that, when run from a development environment:
    1. Creates a vendored copy of WebGPU CTS in `<gecko>/dom/webgpu/tests/cts/checkout/`.
    2. Generates private Web Platform Tests (see also `<gecko>/testing/web-platform/docs/index.rst`). To do this, we:
        1. Use upstream test generation via `npm` scripts, which creates a single `cts.https.html` file with thousands of variants.
        2. Chunk the `cts.https.html` file into parts that Taskcluster can distribute without timing out individual jobs. IMO, this is the most likely part of these changes to need further iteration, because:
            1. We currently naively divide tests by number of variant, and have made no effort to empirically prove that we're dividing execution time of chunks.
            2. There is currently no stability in the distribution of tests per chunk. Test variants are essentially a flattened list of the tree structure used to organize tests. Adding a few tests that end up being placed in the middle of the list can cause the chunk with new tests _and all subsequent chunks_ to have their contents changed, which will probably cause a disproportionate number of line changes to review.:
        3. Fix `script` tag(s) so they actually work with the WPT test runner for private tests (viz., in the `testing/web-platform/mozilla` directory).

The output of the new vendoring binary is designed make the above steps transparent. N.B. that no actual vendoring in of files has happened yet; the next patch will add the results of running this script.

Differential Revision: https://phabricator.services.mozilla.com/D169951
  • Loading branch information
ErichDonGubler committed Mar 22, 2023
1 parent 34cbd31 commit 59905b6
Show file tree
Hide file tree
Showing 13 changed files with 1,819 additions and 7 deletions.
1 change: 1 addition & 0 deletions .hgignore
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@ _OPT\.OBJ/
^servo/ports/geckolib/target/
^dom/base/rust/target/
^servo/components/style/target/
^dom/webgpu/tests/cts/vendor/target/

# Ignore mozharness execution files
^testing/mozharness/.tox/
Expand Down
17 changes: 17 additions & 0 deletions dom/webgpu/tests/cts/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# WebGPU CTS vendor checkout

This directory contains the following:

```sh
.
├── README.md # You are here!
├── arguments.txt # Used by `vendor/`
├── checkout/ # Our vendored copy of WebGPU CTS
├── myexpectations.txt # Used by `vendor/`
└── vendor/ # Rust binary crate for updating `checkout/` and generating WPT tests
```

## Re-vendoring

You can re-vendor by running the Rust binary crate from its Cargo project root. Change your working
directory to `vendor/` and invoke `cargo run -- --help` for more details.
1 change: 1 addition & 0 deletions dom/webgpu/tests/cts/arguments.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
?q=
Empty file.
Loading

0 comments on commit 59905b6

Please sign in to comment.