Kokoro: fix Windows builds to correctly use %BUILD_TYPE%

CMake's CMAKE_BUILD_TYPE variable is ignored for multi-config
generators,like Visual Studio. Instead, we must specify the config when
building.

For VulkanTester, needed to add "RelWithDebInfo" to search paths for
vk_swiftshader.dll as that's the "Release" config we use for Kokoro
builds.

Change-Id: I1fbfa3b179e9364462f4ea6e9704120d3a675b4d
Bug: b/181019484
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/53188
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Kokoro-Result: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Tested-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Nicolas Capens <nicolascapens@google.com>
diff --git a/tests/VulkanWrapper/VulkanTester.cpp b/tests/VulkanWrapper/VulkanTester.cpp
index f601fc3..6d0e7e1 100644
--- a/tests/VulkanWrapper/VulkanTester.cpp
+++ b/tests/VulkanWrapper/VulkanTester.cpp
@@ -168,10 +168,12 @@
 #		if defined(_WIN64)
 	return { "./build/Release_x64/vk_swiftshader.dll",
 		     "./build/Release/vk_swiftshader.dll",
+		     "./build/RelWithDebInfo/vk_swiftshader.dll",
 		     "./vk_swiftshader.dll" };
 #		else
 	return { "./build/Release_Win32/vk_swiftshader.dll",
 		     "./build/Release/vk_swiftshader.dll",
+		     "./build/RelWithDebInfo/vk_swiftshader.dll",
 		     "./vk_swiftshader.dll" };
 #		endif
 #	else
diff --git a/tests/kokoro/gcp_windows/continuous.bat b/tests/kokoro/gcp_windows/continuous.bat
index 4873f25..0251840 100644
--- a/tests/kokoro/gcp_windows/continuous.bat
+++ b/tests/kokoro/gcp_windows/continuous.bat
@@ -21,47 +21,46 @@
 cmake .. ^
     -G "%CMAKE_GENERATOR_TYPE%" ^
     -Thost=x64 ^
-    "-DCMAKE_BUILD_TYPE=%BUILD_TYPE%" ^
     "-DREACTOR_BACKEND=%REACTOR_BACKEND%" ^
     "-DSWIFTSHADER_LLVM_VERSION=%LLVM_VERSION%" ^
     "-DREACTOR_VERIFY_LLVM_IR=1" ^
     "-DLESS_DEBUG_INFO=%LESS_DEBUG_INFO%" || goto :error
 
-cmake --build . || goto :error
+cmake --build . --config %BUILD_TYPE%   || goto :error
 
 REM Run the unit tests. Some must be run from project root
 cd %SRC% || goto :error
 SET SWIFTSHADER_DISABLE_DEBUGGER_WAIT_DIALOG=1
 
-build\Debug\ReactorUnitTests.exe || goto :error
-build\Debug\gles-unittests.exe || goto :error
-build\Debug\system-unittests.exe || goto :error
-build\Debug\vk-unittests.exe || goto :error
+build\%BUILD_TYPE%\ReactorUnitTests.exe || goto :error
+build\%BUILD_TYPE%\gles-unittests.exe || goto :error
+build\%BUILD_TYPE%\system-unittests.exe || goto :error
+build\%BUILD_TYPE%\vk-unittests.exe || goto :error
 
 REM Incrementally build and run rr::Print unit tests
 cd %SRC%\build || goto :error
 cmake "-DREACTOR_ENABLE_PRINT=1" .. || goto :error
-cmake --build . --target ReactorUnitTests || goto :error
-Debug\ReactorUnitTests.exe --gtest_filter=ReactorUnitTests.Print* || goto :error
+cmake --build . --config %BUILD_TYPE% --target ReactorUnitTests || goto :error
+%BUILD_TYPE%\ReactorUnitTests.exe --gtest_filter=ReactorUnitTests.Print* || goto :error
 cmake "-DREACTOR_ENABLE_PRINT=0" .. || goto :error
 
 REM Incrementally build with REACTOR_EMIT_ASM_FILE and run unit test
 cd %SRC%\build || goto :error
 cmake "-DREACTOR_EMIT_ASM_FILE=1" .. || goto :error
-cmake --build . --target ReactorUnitTests || goto :error
-Debug\ReactorUnitTests.exe --gtest_filter=ReactorUnitTests.EmitAsm || goto :error
+cmake --build . --config %BUILD_TYPE% --target ReactorUnitTests || goto :error
+%BUILD_TYPE%\ReactorUnitTests.exe --gtest_filter=ReactorUnitTests.EmitAsm || goto :error
 cmake "-DREACTOR_EMIT_ASM_FILE=0" .. || goto :error
 
 REM Incrementally build with REACTOR_EMIT_DEBUG_INFO to ensure it builds
 cd %SRC%\build || goto :error
 cmake "-DREACTOR_EMIT_DEBUG_INFO=1" .. || goto :error
-cmake --build . --target ReactorUnitTests || goto :error
+cmake --build . --config %BUILD_TYPE% --target ReactorUnitTests || goto :error
 cmake "-DREACTOR_EMIT_DEBUG_INFO=0" .. || goto :error
 
 REM Incrementally build with REACTOR_EMIT_PRINT_LOCATION to ensure it builds
 cd %SRC%\build || goto :error
 cmake "-DREACTOR_EMIT_PRINT_LOCATION=1" .. || goto :error
-cmake --build . --target ReactorUnitTests || goto :error
+cmake --build . --config %BUILD_TYPE% --target ReactorUnitTests || goto :error
 cmake "-DREACTOR_EMIT_PRINT_LOCATION=0" .. || goto :error
 
 exit /b 0