Add GLES unit tests to Kokoro Windows CI
This required disabling the popup dialog which waits for a debugger to
be attached. This is achieved by setting an environment variable:
SWIFTSHADER_DISABLE_DEBUGGER_WAIT_DIALOG=1
Bug b/123360006
Change-Id: Ic1269fdae3088b08a85322cbc7e33a3bdd8292cb
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/27548
Presubmit-Ready: Nicolas Capens <nicolascapens@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Stephen White <senorblanco@chromium.org>
Reviewed-by: Alexis Hétu <sugoi@google.com>
diff --git a/src/Vulkan/main.cpp b/src/Vulkan/main.cpp
index 80b6ee0..9a75f05 100644
--- a/src/Vulkan/main.cpp
+++ b/src/Vulkan/main.cpp
@@ -62,9 +62,17 @@
switch(reason)
{
case DLL_PROCESS_ATTACH:
-#ifdef DEBUGGER_WAIT_DIALOG
- WaitForDebugger(instance);
-#endif
+ #ifdef DEBUGGER_WAIT_DIALOG
+ {
+ char disable_debugger_wait_dialog[] = "0";
+ GetEnvironmentVariable("SWIFTSHADER_DISABLE_DEBUGGER_WAIT_DIALOG", disable_debugger_wait_dialog, sizeof(disable_debugger_wait_dialog));
+
+ if(disable_debugger_wait_dialog[0] != '1')
+ {
+ WaitForDebugger(instance);
+ }
+ }
+ #endif
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH: