OSDN Git Service

Add GLES unit tests to Kokoro Windows CI
authorNicolas Capens <capn@google.com>
Tue, 19 Mar 2019 04:16:20 +0000 (00:16 -0400)
committerNicolas Capens <nicolascapens@google.com>
Wed, 27 Mar 2019 13:33:17 +0000 (13:33 +0000)
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>
src/OpenGL/libEGL/main.cpp
src/Vulkan/main.cpp
tests/kokoro/gcp_windows/continuous.bat

index 0ef957c..d86e80b 100644 (file)
@@ -170,7 +170,15 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved
        {
        case DLL_PROCESS_ATTACH:
                #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
                egl::attachProcess();
                break;
index 80b6ee0..9a75f05 100644 (file)
@@ -62,9 +62,17 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE instance, DWORD reason, LPVOID reserved
        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:
index 75179cf..0008c03 100644 (file)
@@ -6,4 +6,13 @@ cd git\SwiftShader
 
 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