diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /dom/webgpu/tests/cts/checkout/docs/build.md | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dom/webgpu/tests/cts/checkout/docs/build.md')
-rw-r--r-- | dom/webgpu/tests/cts/checkout/docs/build.md | 55 |
1 files changed, 39 insertions, 16 deletions
diff --git a/dom/webgpu/tests/cts/checkout/docs/build.md b/dom/webgpu/tests/cts/checkout/docs/build.md index 2d7b2f968c..d786bbc18c 100644 --- a/dom/webgpu/tests/cts/checkout/docs/build.md +++ b/dom/webgpu/tests/cts/checkout/docs/build.md @@ -1,16 +1,48 @@ # Building Building the project is not usually needed for local development. -However, for exports to WPT, or deployment (https://gpuweb.github.io/cts/), +However, for exports to WPT, NodeJS, [or deployment](https://gpuweb.github.io/cts/), files can be pre-generated. -The project builds into two directories: +## Build types -- `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/` +The project can be built several different ways, each with a different output directory: + +### 0. on-the-fly builds (no output directory) + +Use `npm run start` to launch a server that live-compiles everything as needed. +Use `tools/run_node` and other tools to run under `ts-node` which compiles at runtime. + +### 1. `out` directory + +**Built with**: `npm run standalone` + +**Serve locally with**: `npx grunt serve` + +**Used for**: Static deployment of the CTS, primarily for [gpuweb.github.io/cts](https://gpuweb.github.io/cts/). + +### 2. `out-wpt` directory + +**Built with**: `npm run wpt` + +**Used for**: Deploying into [Web Platform Tests](https://web-platform-tests.org/). See [below](#export-to-wpt) for more information. + +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/` + +### 3. `out-node` directory + +**Built with**: `npm run node` + +**Used for**: Running NodeJS tools, if you want to specifically avoid the live-compilation overhead of the `tools/` versions, or are running on a deployment which no longer has access to `ts-node` (which is a build-time dependency). For example: + +- `node out-node/common/runtime/cmdline.js` ([source](../src/common/runtime/cmdline.ts)) - A command line interface test runner +- `node out-node/common/runtime/server.js` ([source](../src/common/runtime/server.ts)) - An HTTP server for executing CTS tests with a REST interface + +## Testing To build and run all pre-submit checks (including type and lint checks and unittests), use: @@ -25,15 +57,6 @@ For checks only: 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 |