summaryrefslogtreecommitdiffstats
path: root/tools/slang-test/README.md
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2018-12-21 09:28:05 -0500
committerGitHub <noreply@github.com>2018-12-21 09:28:05 -0500
commitb5bda9b3d155234be079debe6997cbc900773cf2 (patch)
tree9a3dc1e026dd906f280f6172a3dfc9d2481bed68 /tools/slang-test/README.md
parent02e44bade6370309c0292e84178095c2bae299be (diff)
* Made 'sub command' git-like - with parameters before going to slang-test and after going to the tool (#764)
* Document some of the changes to command line invocation * Make -v option display the effective command that is being used to run the test
Diffstat (limited to 'tools/slang-test/README.md')
-rw-r--r--tools/slang-test/README.md17
1 files changed, 16 insertions, 1 deletions
diff --git a/tools/slang-test/README.md b/tools/slang-test/README.md
index 1dc44a8b8..9dd46b193 100644
--- a/tools/slang-test/README.md
+++ b/tools/slang-test/README.md
@@ -1,6 +1,6 @@
# Slang Test
-Slang Test is a command line tool that is used to coordinate tests via other command line tools. The actual executable is 'slang-test'. It is typically run from the test.bat script in the root directory of the project.
+Slang Test is a command line tool that is used to coordinate tests via other tools. The actual executable is 'slang-test'. It is typically run from the test.bat script in the root directory of the project.
Slang Test can be thought of as the 'hub' running multiple tests and accumulating the results. In the distribution tests are held in the 'tests' directory. Inside this directory there are tests grouped together via other directories. Inside those directories are the actual tests themselves. The tests exist as .hlsl, .slang and .glsl and other file extensions. The top line of each of these files describe what kind of test will be performed with a specialized comment '//TEST'.
@@ -16,6 +16,20 @@ slang-test -bindir E:\slang\bin\windows-x64\Debug\\ -category full tests/compute
* The -category full means that all tests can be run.
* The final 'free parameter' is 'tests/compute/array-param' and means only tests starting with this string will run.
+Most types of test use 'test tools' to implement actual tests. There are currently 3 'tools' that are typically used
+
+* slangc
+* render-test
+* slang-reflection-test
+
+These are typically implemeted as dlls/shared libraries that are loaded when a test is needed. Sometimes it is necessary or useful to just call one of these test tools directly with the parameters the tool takes. This can be achieved by giving the tool as a 'sub command' name on the command line. All of the parameters after the tool name will be passed directly to the tool. For example
+
+ ```
+slang-test -bindir E:\slang\bin\windows-x64\Debug\\ slangc tests/compute/array-param.slang
+```
+
+Will run the 'slangc' tool with the parameters listed after 'slangc' on the command line. Any parameters before the sub command will be parsed as usual by slang-test, and if not applicable to invoking the tool will be ignored. bindir will be used for finding the tool directory. This is by design so that the sub command invocation can just be placed after the normal slang-test commands, and removed when no longer needed.
+
The command line can control which tests are run with a couple of switches
* -api - Overall controls over which apis will be tested against
@@ -54,6 +68,7 @@ There are the following test categories
* render
* compute
* vulkan
+* compatibility-issue
A test may be in one or more categories. The categories are specified in the test line, for example:
//TEST(smoke,compute):COMPARE_COMPUTE: