summaryrefslogtreecommitdiffstats
path: root/dom/webgpu/tests/cts/checkout/docs/build.md
blob: 2d7b2f968c48df6089f70558197314fa7bcf1ba3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# 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:

```sh
npm test
```

For checks only:

```sh
npm run check
```

For a quicker iterative build:

```sh
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.