fune/dom/webgpu/tests/cts/checkout/docs/build.md
Erich Gubler 07d5552a55 Bug 1720941, part 2: tests(ci): now do the actual vendoring r=webgpu-reviewers,taskgraph-reviewers,jmaher,jimb
After implementing vendoring in part 1, it's time to run it! This patch was broken out from part 1 to isolate very tedious portion of the review. Most of this patch is composed of:

1. Generated CTS test files from part 1.
2. A massive wall of test expectation management acknowledging current passes and failures. Currently, Linux and Windows are expected to pass with these noted failures. Many, but not all, current failures on MacOS are recorded.

Differential Revision: https://phabricator.services.mozilla.com/D169953
2023-03-15 20:13:45 +00:00

1,012 B

Building

Building the project is not usually needed for local development. However, for exports to WPT, or deployment (https://gpuweb.github.io/cts/), files can be pre-generated.

The project builds into two directories:

  • out/: Built framework and test files, needed to run standalone or command line.
  • out-wpt/: Build directory for export into WPT. Contains:
    • An adapter for running WebGPU CTS tests under WPT
    • A copy of the needed files from out/
    • A copy of any .html test cases from src/

To build and run all pre-submit checks (including type and lint checks and unittests), use:

npm test

For checks only:

npm run check

For a quicker iterative build:

npm run standalone

Run

To serve the built files (rather than using the dev server), run npx grunt serve.

Export to WPT

Run npm run wpt.

Copy (or symlink) the out-wpt/ directory as the webgpu/ directory in your WPT checkout or your browser's "internal" WPT test directory.