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:out/
.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
To serve the built files (rather than using the dev server), run npx grunt serve
.
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.