From 3f6cd5ce371a882b22245afb2e0749f7dd0bbcef Mon Sep 17 00:00:00 2001 From: Egor Yusov Date: Sun, 8 Dec 2019 16:01:50 -0800 Subject: Updated run_tests.bat to return the error code of the last failing test --- BuildTools/Scripts/appveyor/run_tests.bat | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'BuildTools/Scripts') diff --git a/BuildTools/Scripts/appveyor/run_tests.bat b/BuildTools/Scripts/appveyor/run_tests.bat index 3a23fd7a..dfff8ced 100644 --- a/BuildTools/Scripts/appveyor/run_tests.bat +++ b/BuildTools/Scripts/appveyor/run_tests.bat @@ -17,15 +17,24 @@ if "%PLATFORM_NAME%"=="Windows8.1" ( ) if "%RUN_API_CORE_TEST%"=="true" ( - "%1\UnitTests\DiligentCoreTest\%CONFIGURATION%\DiligentCoreTest.exe" || set ERROR=%ERRORLEVEL% + "%1\UnitTests\DiligentCoreTest\%CONFIGURATION%\DiligentCoreTest.exe" + if %ERRORLEVEL% NEQ 0 ( + set ERROR=%ERRORLEVEL% + ) ) if "%RUN_CORE_API_D3D11_TEST%"=="true" ( - "%1\UnitTests\DiligentCoreAPITest\%CONFIGURATION%\DiligentCoreAPITest.exe" --mode=d3d11_sw || set ERROR=%ERRORLEVEL% + "%1\UnitTests\DiligentCoreAPITest\%CONFIGURATION%\DiligentCoreAPITest.exe" --mode=d3d11_sw + if %ERRORLEVEL% NEQ 0 ( + set ERROR=%ERRORLEVEL% + ) ) if "%RUN_CORE_API_D3D12_TEST%"=="true" ( - "%1\UnitTests\DiligentCoreAPITest\%CONFIGURATION%\DiligentCoreAPITest.exe" --mode=d3d12_sw || set ERROR=%ERRORLEVEL% + "%1\UnitTests\DiligentCoreAPITest\%CONFIGURATION%\DiligentCoreAPITest.exe" --mode=d3d12_sw + if %ERRORLEVEL% NEQ 0 ( + set ERROR=%ERRORLEVEL% + ) ) exit /B %ERROR% REM use /B to exit the current batch script context, and not the command prompt process -- cgit v1.2.3