summaryrefslogtreecommitdiff
path: root/tools/slang-test
diff options
context:
space:
mode:
Diffstat (limited to 'tools/slang-test')
-rw-r--r--tools/slang-test/options.cpp14
-rw-r--r--tools/slang-test/options.h3
-rw-r--r--tools/slang-test/slang-test-main.cpp5
-rw-r--r--tools/slang-test/test-context.cpp6
4 files changed, 28 insertions, 0 deletions
diff --git a/tools/slang-test/options.cpp b/tools/slang-test/options.cpp
index 7a98caec6..1333407d1 100644
--- a/tools/slang-test/options.cpp
+++ b/tools/slang-test/options.cpp
@@ -90,6 +90,13 @@ static bool _isSubCommand(const char* arg)
" -use-test-server Run tests using test server\n"
" -use-fully-isolated-test-server Run each test in isolated server\n"
" -capability <name> Compile with the given capability\n"
+
+ // Recent Windows runtime versions started opening a dialog popup window when
+ // `abort()` is called, which breaks the CI workflow and some scripts that
+ // expect a normal termination.
+ // It can be helpful for debugging but we should ignore it for CI.
+ " -ignore-abort-msg Ignore abort message dialog popup on Windows\n"
+
" -enable-debug-layers [true|false] Enable or disable Validation Layer for Vulkan\n"
" and Debug Device for DX\n"
" -cache-rhi-device [true|false] Enable or disable RHI device caching (default: true)\n"
@@ -433,6 +440,13 @@ static bool _isSubCommand(const char* arg)
}
optionsOut->capabilities.add(*argCursor++);
}
+ else if (strcmp(arg, "-ignore-abort-msg") == 0)
+ {
+ optionsOut->ignoreAbortMsg = true;
+#ifdef _MSC_VER
+ _set_abort_behavior(0, _WRITE_ABORT_MSG);
+#endif
+ }
else if (strcmp(arg, "-expected-failure-list") == 0)
{
if (argCursor == argEnd)
diff --git a/tools/slang-test/options.h b/tools/slang-test/options.h
index 9223b2eaf..17ff666c3 100644
--- a/tools/slang-test/options.h
+++ b/tools/slang-test/options.h
@@ -142,6 +142,9 @@ struct Options
Slang::HashSet<Slang::String> capabilities;
Slang::HashSet<Slang::String> expectedFailureList;
+ // Ignore abort message dialog popup on Windows
+ bool ignoreAbortMsg = false;
+
/// Parse the args, report any errors into stdError, and write the results into optionsOut
static SlangResult parse(
int argc,
diff --git a/tools/slang-test/slang-test-main.cpp b/tools/slang-test/slang-test-main.cpp
index 08019f995..04283e170 100644
--- a/tools/slang-test/slang-test-main.cpp
+++ b/tools/slang-test/slang-test-main.cpp
@@ -3644,6 +3644,11 @@ static void _addRenderTestOptions(const Options& options, CommandLine& ioCmdLine
ioCmdLine.addArg("-enable-debug-layers");
}
+ if (options.ignoreAbortMsg)
+ {
+ ioCmdLine.addArg("-ignore-abort-msg");
+ }
+
if (options.cacheRhiDevice)
{
ioCmdLine.addArg("-cache-rhi-device");
diff --git a/tools/slang-test/test-context.cpp b/tools/slang-test/test-context.cpp
index e3655e61d..a864cb326 100644
--- a/tools/slang-test/test-context.cpp
+++ b/tools/slang-test/test-context.cpp
@@ -196,6 +196,12 @@ SlangResult TestContext::_createJSONRPCConnection(RefPtr<JSONRPCConnection>& out
{
CommandLine cmdLine;
cmdLine.setExecutableLocation(ExecutableLocation(exeDirectoryPath, "test-server"));
+
+ if (options.ignoreAbortMsg)
+ {
+ cmdLine.addArg("-ignore-abort-msg");
+ }
+
SLANG_RETURN_ON_FAIL(Process::create(
cmdLine,
Process::Flag::AttachDebugger | Process::Flag::DisableStdErrRedirection,