summaryrefslogtreecommitdiffstats
path: root/tools/slang-test/options.cpp
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2025-09-23 23:46:31 -0700
committerGitHub <noreply@github.com>2025-09-23 23:46:31 -0700
commit979e16a34ef9ff2806476b809e2dcba5a96c40d4 (patch)
tree0572ac88539aa33ede15f8089cd9a7903b816f9f /tools/slang-test/options.cpp
parent796ea80a0309002f7a4c959416b4b2cf67bf4a27 (diff)
Adding slang-test option to ignore abort popup message (#8492)
With the recent Windows runtime libraries, a new popup window started appearing when `abort()` is called. This was observed when VVL prints a message as a part of WGPU test. Although it can be helpful when we want to debug it, it breaks the behavior of CI scripts when the tests are expected to continue even when they fail. When the test fail, CI script stops in the middle and wait for a user to click on a button on the dialog window, which cannot happen. As a result, when there is a VVL error message, CI run stops in the middle and the testing stops prematurely. This commit adds a new command-line argument, `-ignore-abort-msg`, that ignores the abort message and it wouldn't show the dialog popup window. From the implementation perspective, there are three places that are related. - slang-test itself should turn off the flag. - render-test should turn off the flag after getting the argument from slang-test - test-server should turn off the flag after getting the argument from slang-test When test-server runs render-test, the arguments are already handled by slang-test, so test-server needs to just pass through the arguments.
Diffstat (limited to 'tools/slang-test/options.cpp')
-rw-r--r--tools/slang-test/options.cpp14
1 files changed, 14 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)