commit | 57e8bfab3d3e6a2893b8feca359f5b491af03fc8 | [log] [tgz] |
---|---|---|
author | Kai Ninomiya <kainino@chromium.org> | Sat Jan 11 02:25:17 2020 |
committer | Kai Ninomiya <kainino1@gmail.com> | Sat Jan 11 02:37:53 2020 |
tree | 54d84eb08cef48065b5d9217349e6dde7f4e2933 | |
parent | f73aadee54495276f15a072e4ea2fdbf48ef43ce [diff] |
rename .worker.js to -worker.js so WPT won't try to run it as a standalone test
The WebGPU CTS is written in TypeScript, and 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 WPT runner and a copy of just the needed files from out/
.After checking out the repository and installing Yarn, run these commands to set up dependencies:
cd cts/ yarn install npx grunt # show available grunt commands
To build and run all pre-submit checks (including type and lint checks and unittests), use:
npx grunt pre
For a quicker iterative build:
npx grunt test
To test in a browser under the standalone harness, run grunt serve
, then open:
To see debug logs in a browser, use the debug=1
query string:
To add new tests, simply imitate the pattern in neigboring tests or neighboring files. New test files must be named ending in .spec.ts
.
For an example, see src/suites/cts/examples.spec.ts
.
Since this project is written in TypeScript, it integrates best with Visual Studio Code. There are also some default settings (in .vscode/settings.json
) which will be applied automatically.
Before uploading, you should run pre-submit checks (grunt pre
).
Be sure to read CONTRIBUTING.md.
Copy (or symlink) the out-wpt/
directory as the webgpu/
directory in your WPT checkout.