Skip to content

Commit b659bbb

Browse files
committed
more
1 parent 26f6b2b commit b659bbb

File tree

2 files changed

+26
-6
lines changed

2 files changed

+26
-6
lines changed

tools/gfx-unit-test/precompiled-module-2.cpp

+23-5
Original file line numberDiff line numberDiff line change
@@ -284,11 +284,29 @@ SLANG_UNIT_TEST(precompiledModule2Vulkan)
284284

285285
SLANG_UNIT_TEST(precompiledTargetModule2Vulkan)
286286
{
287-
printf("Starting precompiledTargetModule2Vulkan\n");
288-
fflush(stdout);
289-
runTestImpl(precompiledTargetModule2TestImpl, unitTestContext, Slang::RenderApiFlag::Vulkan);
290-
printf("Finished precompiledTargetModule2Vulkan\n");
291-
fflush(stdout);
287+
// catch all exceptions
288+
try
289+
{
290+
printf("Starting precompiledTargetModule2Vulkan\n");
291+
fflush(stdout);
292+
runTestImpl(
293+
precompiledTargetModule2TestImpl,
294+
unitTestContext,
295+
Slang::RenderApiFlag::Vulkan);
296+
printf("Finished precompiledTargetModule2Vulkan\n");
297+
fflush(stdout);
298+
}
299+
catch (const std::exception&)
300+
{
301+
printf("Caught exception\n");
302+
fflush(stdout);
303+
}
304+
catch (...)
305+
{
306+
printf("Caught unknown exception\n");
307+
fflush(stdout);
308+
}
309+
292310
}
293311

294312
} // namespace gfx_test

tools/slang-test/slang-test-main.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -2684,7 +2684,9 @@ static TestResult runCPPCompilerSharedLibrary(TestContext* context, TestInput& i
26842684
{
26852685
printf("Unable to access 'test' function\n");
26862686
}
2687-
2687+
2688+
printf("Unload handle\n");
2689+
fflush(stdout);
26882690
SharedLibrary::unload(handle);
26892691

26902692
if (!(inValue == value && strcmp(inBuffer, buffer) == 0))

0 commit comments

Comments
 (0)