Kokoro: Build VS solutions produced from CMake

This now builds both the LLVM and Subzero Reactor backends.
Fixed issue where failures were not actually failing the build in continuous.bat.
Changed the test's expected path of vk_swiftshader.dll to more closely match macOS and Linux.

Bug: b/130458775
Bug: b/123360006
Change-Id: Id2cfc0a7016c9813597567fd6ab900fe4047b8f8
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/29109
Presubmit-Ready: Ben Clayton <bclayton@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
Tested-by: Ben Clayton <bclayton@google.com>
Kokoro-Presubmit: kokoro <noreply+kokoro@google.com>
diff --git a/tests/VulkanUnitTests/Driver.cpp b/tests/VulkanUnitTests/Driver.cpp
index a851883..e51c4c5 100644
--- a/tests/VulkanUnitTests/Driver.cpp
+++ b/tests/VulkanUnitTests/Driver.cpp
@@ -50,9 +50,9 @@
 {
 #if OS_WINDOWS
 #    if defined(NDEBUG)
-    return load("../../build/Release_x64/vk_swiftshader.dll");
+    return load("./build/Release/libvk_swiftshader.dll");
 #    else
-    return load("../../build/Debug_x64/vk_swiftshader.dll");
+    return load("./build/Debug/libvk_swiftshader.dll");
 #    endif
 #elif OS_MAC
     return load("./build/Darwin/libvk_swiftshader.dylib");
diff --git a/tests/kokoro/gcp_windows/continuous.bat b/tests/kokoro/gcp_windows/continuous.bat
index 184b17a..3e3ca2f 100644
--- a/tests/kokoro/gcp_windows/continuous.bat
+++ b/tests/kokoro/gcp_windows/continuous.bat
@@ -1,19 +1,38 @@
 @echo on
 
-SET PATH=%PATH%;C:\python27
+SETLOCAL ENABLEDELAYEDEXPANSION
 
-cd git\SwiftShader
+SET PATH=%PATH%;C:\python27;C:\Program Files\cmake\bin
+set SRC=%cd%\git\SwiftShader
+
+cd %SRC%
+if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
 
 git submodule update --init
+if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
 
 SET MSBUILD="C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild"
 SET CONFIG=Debug
 
-REM TODO: Switch between reactor backends with the REACTOR_BACKEND env var.
-%MSBUILD% /p:Configuration=%CONFIG% SwiftShader.sln
+cd %SRC%\build
+if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
 
-SET PATH=%PATH%;T:\src\git\SwiftShader\out\Debug_x64
+cmake .. -G "Visual Studio 15 2017 Win64" -Thost=x64 "-DREACTOR_BACKEND=%REACTOR_BACKEND%"
+if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
+
+%MSBUILD% /p:Configuration=%CONFIG% SwiftShader.sln
+if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
+
+REM Run the unit tests. They must be run from project root
+cd %SRC%
+if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
 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
+build\Debug\gles-unittests.exe
+if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
+
+IF NOT "%REACTOR_BACKEND%"=="Subzero" (
+    REM Currently vulkan does not work with Subzero.
+    build\Debug\vk-unittests.exe
+    if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
+)
\ No newline at end of file