diff options
| author | Yong He <yonghe@outlook.com> | 2023-08-16 19:01:39 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-16 19:01:39 -0700 |
| commit | 3e41d698714a3ab6235e9275d5e0687a1c5db9c9 (patch) | |
| tree | 019635f444cb2efb320b7541ca3f341fbf191978 /tools/slang-test/options.cpp | |
| parent | eaeb7cf2913b884f9328433090242f8202e00699 (diff) | |
Run vk tests on spirv backend with expected failure list. (#3128)
Diffstat (limited to 'tools/slang-test/options.cpp')
| -rw-r--r-- | tools/slang-test/options.cpp | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/tools/slang-test/options.cpp b/tools/slang-test/options.cpp index 8ab9e9ae2..3fb71dd4a 100644 --- a/tools/slang-test/options.cpp +++ b/tools/slang-test/options.cpp @@ -3,7 +3,6 @@ #include "../../source/core/slang-string-util.h" #include "../../source/core/slang-io.h" - #include <stdio.h> #include <stdlib.h> @@ -291,6 +290,27 @@ static bool _isSubCommand(const char* arg) { optionsOut->skipApiDetection = true; } + else if (strcmp(arg, "-emit-spirv-directly") == 0) + { + optionsOut->emitSPIRVDirectly = true; + } + else if (strcmp(arg, "-expected-failure-list") == 0) + { + if (argCursor == argEnd) + { + stdError.print("error: expected operand for '%s'\n", arg); + return SLANG_FAIL; + } + auto fileName = *argCursor++; + String text; + File::readAllText(fileName, text); + List<UnownedStringSlice> lines; + StringUtil::split(text.getUnownedSlice(), '\n', lines); + for (auto line : lines) + { + optionsOut->expectedFailureList.add(line); + } + } else { stdError.print("unknown option '%s'\n", arg); |
