Commit e43cda5f by Nicolas Capens Committed by Nicolas Capens

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: 's avatarNicolas Capens <nicolascapens@google.com> Reviewed-by: 's avatarStephen White <senorblanco@chromium.org> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com>
parent df5b28fd
...@@ -170,7 +170,15 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved ...@@ -170,7 +170,15 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved
{ {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
#ifdef DEBUGGER_WAIT_DIALOG #ifdef DEBUGGER_WAIT_DIALOG
WaitForDebugger(instance); {
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 #endif
egl::attachProcess(); egl::attachProcess();
break; break;
......
...@@ -62,9 +62,17 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved ...@@ -62,9 +62,17 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved
switch(reason) switch(reason)
{ {
case DLL_PROCESS_ATTACH: case DLL_PROCESS_ATTACH:
#ifdef DEBUGGER_WAIT_DIALOG #ifdef DEBUGGER_WAIT_DIALOG
WaitForDebugger(instance); {
#endif 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; break;
case DLL_THREAD_ATTACH: case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH: case DLL_THREAD_DETACH:
......
...@@ -6,4 +6,13 @@ cd git\SwiftShader ...@@ -6,4 +6,13 @@ cd git\SwiftShader
git submodule update --init git submodule update --init
"C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild" SwiftShader.sln SET MSBUILD="C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild"
SET CONFIG=Debug
%MSBUILD% /p:Configuration=%CONFIG% SwiftShader.sln
SET PATH=%PATH%;T:\src\git\SwiftShader\out\Debug_x64
SET SWIFTSHADER_DISABLE_DEBUGGER_WAIT_DIALOG=1
REM Run the GLES unit tests. TODO(capn): move to different directory (build?).
bin\GLESUnitTests\x64\Debug\GLESUnitTests.exe
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment