diff options
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/slang-test/slang-test-main.cpp | 8 | ||||
| -rw-r--r-- | tools/test-server/test-server-main.cpp | 6 |
2 files changed, 11 insertions, 3 deletions
diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp index 0d7540357..72af73cc1 100644 --- a/tools/slang-test/slang-test-main.cpp +++ b/tools/slang-test/slang-test-main.cpp @@ -4755,6 +4755,9 @@ static SlangResult runUnitTestModule( { TestReporter::TestScope scopeTest(reporter, options.command); ExecuteResult exeRes; + // Initialize the ExecuteResult, otherwise we can get bogus + // error results. + exeRes.init(); SlangResult rpcRes = _executeRPC( context, @@ -5068,15 +5071,14 @@ SlangResult innerMain(int argc, char** argv) // Try the unit tests up to 3 times for (bool isRetry : {false, true, true}) { - // Use default spawn type for unit tests as the test server one is unstable - auto spawnType = SpawnType::Default; + auto spawnType = context.getFinalSpawnType(); context.isRetry = isRetry; if (isRetry) { if (context.failedUnitTests.getCount() == 0) break; - printf("Retrying unit tests with default spawn type...\n"); + printf("Retrying unit tests...\n"); context.options.testPrefixes = context.failedUnitTests; context.failedUnitTests.clear(); } diff --git a/tools/test-server/test-server-main.cpp b/tools/test-server/test-server-main.cpp index 3faa6352f..c00cab428 100644 --- a/tools/test-server/test-server-main.cpp +++ b/tools/test-server/test-server-main.cpp @@ -446,6 +446,12 @@ SlangResult TestServer::_executeUnitTest(const JSONRPCCall& call) unitTestContext.workDirectory = ""; unitTestContext.enabledApis = RenderApiFlags(args.enabledApis); unitTestContext.executableDirectory = m_exeDirectory.getBuffer(); + // When using test server, any validation warning printed from the backend + // gets misinterpreted as the result from the test. + // This is due to the limitation that Slang RPC implementation expects only + // one time communication. Set enableDebugLayers to false to avoid Vulkan + // test failures when running on debug using test server. + unitTestContext.enableDebugLayers = false; auto testCount = testModule->getTestCount(); SLANG_ASSERT(testIndex >= 0 && testIndex < testCount); |
