Commit 818a9ae6 by Antonio Maiorano

Make Windows Kokoro script less verbose

This is as close as we'll get to "set -e" from bash. Makes the script less verbose, and closer to the Linux and MacOS ones. Bug: b/159633249 Change-Id: Ied7cdb5ab11b737fb21379be912393bbd838a40a Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/45968 Kokoro-Result: kokoro <noreply+kokoro@google.com> Reviewed-by: 's avatarNicolas Capens <nicolascapens@google.com> Tested-by: 's avatarAntonio Maiorano <amaiorano@google.com>
parent 9167e1e2
...@@ -3,11 +3,9 @@ ...@@ -3,11 +3,9 @@
SETLOCAL ENABLEDELAYEDEXPANSION SETLOCAL ENABLEDELAYEDEXPANSION
SET PATH=C:\python36;C:\Program Files\cmake\bin;%PATH% SET PATH=C:\python36;C:\Program Files\cmake\bin;%PATH%
set SRC=%cd%\git\SwiftShader SET SRC=%cd%\git\SwiftShader
cd %SRC%
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
cd %SRC% || goto :error
IF "%LLVM_VERSION%"=="10.0" ( IF "%LLVM_VERSION%"=="10.0" (
ECHO "TODO(b/152339534): LLVM 10 migration is still in progress" ECHO "TODO(b/152339534): LLVM 10 migration is still in progress"
...@@ -17,10 +15,9 @@ IF "%LLVM_VERSION%"=="10.0" ( ...@@ -17,10 +15,9 @@ IF "%LLVM_VERSION%"=="10.0" (
# Lower the amount of debug info, to reduce Kokoro build times. # Lower the amount of debug info, to reduce Kokoro build times.
SET LESS_DEBUG_INFO=1 SET LESS_DEBUG_INFO=1
cd %SRC%\build cd %SRC%\build || goto :error
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
rem Update CMake REM Update CMake
choco upgrade cmake -y --limit-output --no-progress choco upgrade cmake -y --limit-output --no-progress
cmake --version cmake --version
...@@ -31,42 +28,27 @@ cmake .. ^ ...@@ -31,42 +28,27 @@ cmake .. ^
"-DREACTOR_BACKEND=%REACTOR_BACKEND%" ^ "-DREACTOR_BACKEND=%REACTOR_BACKEND%" ^
"-DSWIFTSHADER_LLVM_VERSION=%LLVM_VERSION%" ^ "-DSWIFTSHADER_LLVM_VERSION=%LLVM_VERSION%" ^
"-DREACTOR_VERIFY_LLVM_IR=1" ^ "-DREACTOR_VERIFY_LLVM_IR=1" ^
"-DLESS_DEBUG_INFO=%LESS_DEBUG_INFO%" "-DLESS_DEBUG_INFO=%LESS_DEBUG_INFO%" || goto :error
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
cmake --build . cmake --build . || goto :error
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
REM Run the unit tests. Some must be run from project root REM Run the unit tests. Some must be run from project root
cd %SRC% cd %SRC% || goto :error
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
SET SWIFTSHADER_DISABLE_DEBUGGER_WAIT_DIALOG=1 SET SWIFTSHADER_DISABLE_DEBUGGER_WAIT_DIALOG=1
build\Debug\ReactorUnitTests.exe build\Debug\ReactorUnitTests.exe || goto :error
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL! build\Debug\gles-unittests.exe || goto :error
build\Debug\system-unittests.exe || goto :error
build\Debug\gles-unittests.exe build\Debug\vk-unittests.exe || goto :error
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
build\Debug\system-unittests.exe
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
build\Debug\vk-unittests.exe
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
Rem Incrementally build and run rr::Print unit tests REM Incrementally build and run rr::Print unit tests
cd %SRC%\build cd %SRC%\build || goto :error
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL! cmake "-DREACTOR_ENABLE_PRINT=1" .. || goto :error
cmake --build . --target ReactorUnitTests || goto :error
cd %SRC% || goto :error
build\Debug\ReactorUnitTests.exe --gtest_filter=ReactorUnitTests.Print* || goto :error
cmake "-DREACTOR_ENABLE_PRINT=1" .. exit /b 0
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
cmake --build . --target ReactorUnitTests
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
cd %SRC%
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL!
SET SWIFTSHADER_DISABLE_DEBUGGER_WAIT_DIALOG=1
build\Debug\ReactorUnitTests.exe --gtest_filter=ReactorUnitTests.Print* :error
if !ERRORLEVEL! neq 0 exit /b !ERRORLEVEL! exit /b !ERRORLEVEL!
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