diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2020-07-24 11:12:58 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-07-24 08:12:58 -0700 |
| commit | cb0a08b55f3d1be44b36fc4fc5f34405c2b1516e (patch) | |
| tree | 590bb13cfa011bdc0a2ef913c18bfb907b9f5580 /tools/slang-test/test-context.cpp | |
| parent | 7e952cde57719169bd8384427842cba033c9f80c (diff) | |
Test frame work improvements (#1452)
* Add -hide-ignored
Made API filter when enbled filter out non API tests.
* Add ability to set categories at file level.
Added wave, wave-mask and wave-active categories.
* Added -api-only flag.
* Don't synthesize tests from only CPU tests.
Co-authored-by: Tim Foley <tfoleyNV@users.noreply.github.com>
Diffstat (limited to 'tools/slang-test/test-context.cpp')
| -rw-r--r-- | tools/slang-test/test-context.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tools/slang-test/test-context.cpp b/tools/slang-test/test-context.cpp index 0a0931596..8fa5cb345 100644 --- a/tools/slang-test/test-context.cpp +++ b/tools/slang-test/test-context.cpp @@ -110,3 +110,15 @@ Slang::DownstreamCompiler* TestContext::getDefaultCompiler(SlangSourceLanguage s return set ? set->getDefaultCompiler(sourceLanguage) : nullptr; } +bool TestContext::canRunTestWithRenderApiFlags(Slang::RenderApiFlags requiredFlags) +{ + // If only allow tests that use API - then the requiredFlags must be 0 + if (options.apiOnly && requiredFlags == 0) + { + return false; + } + // Are the required rendering APIs enabled from the -api command line switch + return (requiredFlags & options.enabledApis) == requiredFlags; +} + + |
