diff options
| author | jsmall-nvidia <jsmall@nvidia.com> | 2019-04-02 09:22:13 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-02 09:22:13 -0400 |
| commit | 2896aa39a529a00673a30ef4a9c3ebe76f401fea (patch) | |
| tree | 3db2c41af598b3285c5313055d90dbf1a5cc06b6 /tools/render-test/render-test-main.cpp | |
| parent | c21bffecd9da150576f62ecf8a73a1660717abe9 (diff) | |
Feature/test improvements (#934)
* First pass extract the test information by 'running tests'.
* * Checking renderer availablilty
* Using TestInfo to determine which tests are run and synthesized
* Display if test is synthesized and what render api it's targetting
* * Improved comments
* Removed some dead code
* Display ignored tests.
* TestInfo -> TestRequirements
* * Added DIAGNOSTIC_TEST type - test always runs (ie has no requirements).
* Made diagnostic tests use DIAGNOSTIC_TEST
* TestInfo -> TestRequirements
* TestDetails holds TestRequirements and TestOptions
* Fix debug typo.
Diffstat (limited to 'tools/render-test/render-test-main.cpp')
| -rw-r--r-- | tools/render-test/render-test-main.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tools/render-test/render-test-main.cpp b/tools/render-test/render-test-main.cpp index 2bc6cd8f8..34e041473 100644 --- a/tools/render-test/render-test-main.cpp +++ b/tools/render-test/render-test-main.cpp @@ -555,6 +555,7 @@ SLANG_TEST_TOOL_API SlangResult innerMain(Slang::StdWriters* stdWriters, SlangSe return SLANG_FAIL; } + StringBuilder rendererName; rendererName << "[" << RendererUtil::toText(gOptions.rendererType) << "] "; if (gOptions.adapter.Length()) @@ -565,7 +566,10 @@ SLANG_TEST_TOOL_API SlangResult innerMain(Slang::StdWriters* stdWriters, SlangSe if (!renderer) { - fprintf(stderr, "Unable to create renderer %s\n", rendererName.Buffer()); + if (!gOptions.onlyStartup) + { + fprintf(stderr, "Unable to create renderer %s\n", rendererName.Buffer()); + } return SLANG_FAIL; } @@ -578,11 +582,20 @@ SLANG_TEST_TOOL_API SlangResult innerMain(Slang::StdWriters* stdWriters, SlangSe SlangResult res = renderer->initialize(desc, (HWND)window->getHandle()); if (SLANG_FAILED(res)) { - fprintf(stderr, "Unable to initialize renderer %s\n", rendererName.Buffer()); + if (!gOptions.onlyStartup) + { + fprintf(stderr, "Unable to initialize renderer %s\n", rendererName.Buffer()); + } return res; } } + // If the only test is we can startup, then we are done + if (gOptions.onlyStartup) + { + return SLANG_OK; + } + { for (const auto& feature : gOptions.renderFeatures) { |
