summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorSam Estep <sam@samestep.com>2025-08-06 17:55:06 -0400
committerGitHub <noreply@github.com>2025-08-06 21:55:06 +0000
commitea600fa8f0bc29f1d6d9ef58e0b045edd5c21e0c (patch)
tree6f92e1e3a5d92ec9381cd6443b11148bb512a52e /tools
parente0b912575c1db3c6f8273b154f8dcb2462a03d2e (diff)
Document how to ignore tests (#8049)
* Document how to ignore tests * Use `DISABLE_TEST` instead of `IGNORE_TEST`
Diffstat (limited to 'tools')
-rw-r--r--tools/slang-test/README.md18
1 files changed, 17 insertions, 1 deletions
diff --git a/tools/slang-test/README.md b/tools/slang-test/README.md
index 243d07f9a..7e9d01a08 100644
--- a/tools/slang-test/README.md
+++ b/tools/slang-test/README.md
@@ -85,6 +85,8 @@ Available APIs:
Tests are identified by a special comment at the start of the test file: `//TEST:<type>:`
+To ignore a test, use `//DISABLE_TEST` instead of `//TEST`.
+
Available test types:
- `SIMPLE`: Runs the slangc compiler with specified options after the command
- `REFLECTION`: Runs slang-reflection-test with the options specified after the command
@@ -103,7 +105,21 @@ Deprecated test types (do not create new tests of these kinds, and we need to sl
- `CROSS_COMPILE`: Compiles using GLSL pass-through and through Slang, then compares the outputs
## Unit Tests
-In addition to the above test tools, there are also `slang-unit-test-tool` and `gfx-unit-test-tool`, which are invoked as in the following examples.
+In addition to the above test tools, there are also `slang-unit-test-tool` and `gfx-unit-test-tool`, which are invoked as in the following examples; but note that the unit tests do get run as part of `slang-test` as well.
+
+To ignore a unit test, use the `SLANG_IGNORE_TEST` macro:
+
+```cpp
+SLANG_UNIT_TEST(foo)
+{
+ if (condition)
+ {
+ SLANG_IGNORE_TEST
+ }
+
+ // ...
+}
+```
### slang-unit-test-tool
```bash