diff options
| author | Ellie Hermaszewska <ellieh@nvidia.com> | 2023-04-11 23:28:58 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-11 11:28:58 -0400 |
| commit | d6dd38f5210fedfd96ff088ef9b8a2424c79c4f0 (patch) | |
| tree | 31d79abe8e205ef5ae7605b2290aa357e80f324b /tests/diagnostics | |
| parent | 20ea33f3321738e7c1b4cad7bdcaedcdb54dd0f0 (diff) | |
Implement FileCheck tests for several test commands (#2747)
* Add missing expected.txt for test
* Diagnostics -> StdWriters in render test
* Allow specifying several test prefixes to run
`slang-test -- tests/foo tests/bar`
* Squash warnings in some tests
* Enable gfx debug layer in gfx test util
Makes this issue present consistently: https://github.com/shader-slang/slang/issues/2766
* Allow DebugDevice to return interfaces instantiated by the debugged object
* Check that we actaully have a shader cache for shader cache tests
* Implement FileCheck tests for several test commands
- SIMPLE, SIMPLE_EX
- SIMPLE_LINE
- REFLECTION, CPU_REFLECTION
- CROSS_COMPILE
It does not currently support the render tests or the COMPARE_COMPUTE commands
It is invoked by adding `(filecheck=MY_FILECHECK_PREFIX)` to the test command, for example
TEST:CROSS_COMPILE(filecheck=SPIRV): -target spirv-assembly
* Move LLVM FileCheck interface to slang-llvm
* Neaten slang-test tests
* Refine handling of expected output in slang-test
* Add example FileCheck buffer test
* Add cuda-kernel-export tests
Which were waiting on FileCheck
* Bump vs project files
* Make createLLVMFileCheck_V1 return a void* rather than specifically an IFileCheck
* Remove use of CharSlice from filecheck interface
* Bump slang-llvm version
---------
Co-authored-by: jsmall-nvidia <jsmall@nvidia.com>
Diffstat (limited to 'tests/diagnostics')
| -rw-r--r-- | tests/diagnostics/local-line.slang | 2 | ||||
| -rw-r--r-- | tests/diagnostics/local-line.slang.expected | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/tests/diagnostics/local-line.slang b/tests/diagnostics/local-line.slang index 973c234c0..532307a8f 100644 --- a/tests/diagnostics/local-line.slang +++ b/tests/diagnostics/local-line.slang @@ -3,6 +3,7 @@ //TEST:SIMPLE_LINE:-entry computeMain -target dxbc -stage compute //TEST:SIMPLE_LINE:-entry computeMain -target dll -stage compute //TEST:SIMPLE_LINE:-entry computeMain -target ptx -stage compute +//TEST:SIMPLE_LINE(filecheck=CHECK):-entry computeMain -target spirv -stage compute //TEST_INPUT:ubuffer(data=[0 0 0 0], stride=4):out,name outputBuffer RWStructuredBuffer<int> outputBuffer; @@ -37,6 +38,7 @@ void computeMain(uint3 dispatchThreadID : SV_DispatchThreadID) else { a = e; b = c + c; d += d + __SyntaxError(); e = doThing(e, int(dispatchThreadID.x)); + // CHECK: [[#@LINE-1]] } } diff --git a/tests/diagnostics/local-line.slang.expected b/tests/diagnostics/local-line.slang.expected index a2720097d..425151f3a 100644 --- a/tests/diagnostics/local-line.slang.expected +++ b/tests/diagnostics/local-line.slang.expected @@ -1 +1 @@ -39 +40 |
