diff options
author | Antonio Maiorano <amaiorano@google.com> | 2021-02-23 11:10:50 -0500 |
---|---|---|
committer | swiftshader-scoped@luci-project-accounts.iam.gserviceaccount.com <swiftshader-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2021-02-24 16:30:32 +0000 |
commit | a7dfb849ac3ee71a657ac19df8df4ae08cadc382 (patch) | |
tree | 2a2c99ce255be14c99d2495b2fe5541751a10875 | |
parent | d6f3132e2c33154d22740ee9c7f87f6b842a8a86 (diff) | |
download | swiftshader-a7dfb849ac3ee71a657ac19df8df4ae08cadc382.tar.gz |
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>
-rw-r--r-- | tests/VulkanWrapper/VulkanTester.cpp | 2 | ||||
-rw-r--r-- | tests/kokoro/gcp_windows/continuous.bat | 23 |
2 files changed, 13 insertions, 12 deletions
diff --git a/tests/VulkanWrapper/VulkanTester.cpp b/tests/VulkanWrapper/VulkanTester.cpp index f601fc341..6d0e7e157 100644 --- a/tests/VulkanWrapper/VulkanTester.cpp +++ b/tests/VulkanWrapper/VulkanTester.cpp @@ -168,10 +168,12 @@ std::vector<const char *> getDriverPaths() # 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 4873f25b1..025184031 100644 --- a/tests/kokoro/gcp_windows/continuous.bat +++ b/tests/kokoro/gcp_windows/continuous.bat @@ -21,47 +21,46 @@ cmake --version 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 |