Update docs on how to test Tint
Add a top-level Tint testing doc, linking it from Dawn's main README.
Fix the paths in the Tint end-to-end testing doc.
Change-Id: I8f0d7bbb05e1f627951df5efbe7fd0fa2bc19d7e
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/152300
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Reviewed-by: Ben Clayton <bclayton@google.com>
Kokoro: Kokoro <noreply+kokoro@google.com>
Commit-Queue: David Neto <dneto@google.com>
diff --git a/README.md b/README.md
index 4fb672f..53c0444 100644
--- a/README.md
+++ b/README.md
@@ -33,6 +33,7 @@
- [Contributing](CONTRIBUTING.md)
- [Code of Conduct](CODE_OF_CONDUCT.md)
- [Testing Dawn](docs/dawn/testing.md)
+ - [Testing Tint](docs/tint/testing.md)
- [Debugging Dawn](docs/dawn/debugging.md)
- [Dawn's infrastructure](docs/dawn/infra.md)
- [Dawn errors](docs/dawn/errors.md)
diff --git a/docs/tint/end-to-end-tests.md b/docs/tint/end-to-end-tests.md
index 8a34f76..693c1f3 100644
--- a/docs/tint/end-to-end-tests.md
+++ b/docs/tint/end-to-end-tests.md
@@ -1,6 +1,6 @@
# Tint end-to-end tests
-This repo contains a large number of end-to-end tests at `<tint>/test`.
+This repo contains a large number of end-to-end tests at `<dawn>/test/tint`.
## Test files
@@ -16,7 +16,13 @@
## Running
-To run the end-to-end tests use the `<tint>/test/test-all.sh` script, passing the path to the tint executable as the first command line argument.
+To run the end-to-end tests use the `<dawn>/test/test-all.sh` script, passing the path to the tint executable as the first command line argument.
+
+For example, if your build directory is `out/active`, then building Dawn will
+place the standalone `tint` compiler executable in that directory. In that case
+you can run all the tests as follows:
+
+ ./test/test-all.sh out/active/tint
You can pass `--help` to see the full list of command line flags.\
The most commonly used flags are:
diff --git a/docs/tint/testing.md b/docs/tint/testing.md
new file mode 100644
index 0000000..f43b058
--- /dev/null
+++ b/docs/tint/testing.md
@@ -0,0 +1,16 @@
+# Testing Tint
+
+Tint has multiple levels of testing:
+
+* Unit tests, using the Googletest framework. These are the lowest level tests,
+ comprehensively checking functionality of internal functions and classes.
+ The test code is inside the Tint source tree in files with names ending in
+ `_test.cc`
+* End-to-end tests. These test the whole compiler flow, translating source
+ shaders to output shaders in various languages, and optionally checking
+ the text of diagnostics. See [Tint end-to-end tests](end-to-end-testing.md).
+* WebGPU Conformance Test Suite (CTS). The WebGPU CTS has both validation and
+ execution tests, in the `webgpu:shader` hierarchy.
+ See https://github.com/gpuweb/cts
+ All test can be run in Chrome, and many tests can be run via `dawn.node`,
+ the [Dawn bindings for NodeJS](../../src/dawn/node/README.md).