From ab6b4ce15e7bc83f28b75b8ca8f234b6be7535f1 Mon Sep 17 00:00:00 2001 From: assiduous Date: Thu, 12 Dec 2019 17:27:15 -0800 Subject: Fixed run_tests.bat to avoid strange behavior of errorlevel --- BuildTools/Scripts/appveyor/run_tests.bat | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'BuildTools/Scripts') diff --git a/BuildTools/Scripts/appveyor/run_tests.bat b/BuildTools/Scripts/appveyor/run_tests.bat index 2d4219ab..19390ed9 100644 --- a/BuildTools/Scripts/appveyor/run_tests.bat +++ b/BuildTools/Scripts/appveyor/run_tests.bat @@ -17,24 +17,15 @@ if "%PLATFORM_NAME%"=="Windows8.1" ( ) if "%RUN_API_CORE_TEST%"=="true" ( - "%1\UnitTests\DiligentCoreTest\%CONFIGURATION%\DiligentCoreTest.exe" - if %ERRORLEVEL% NEQ 0 ( - set ERROR=%ERRORLEVEL% - ) + "%1\UnitTests\DiligentCoreTest\%CONFIGURATION%\DiligentCoreTest.exe" || set ERROR=1 ) if "%RUN_CORE_API_D3D11_TEST%"=="true" ( - "%1\UnitTests\DiligentCoreAPITest\%CONFIGURATION%\DiligentCoreAPITest.exe" --mode=d3d11_sw - if %ERRORLEVEL% NEQ 0 ( - set ERROR=%ERRORLEVEL% - ) + ("%1\UnitTests\DiligentCoreAPITest\%CONFIGURATION%\DiligentCoreAPITest.exe" --mode=d3d11_sw) || set /a ERROR=%ERROR%+10 ) if "%RUN_CORE_API_D3D12_TEST%"=="true" ( - "%1\UnitTests\DiligentCoreAPITest\%CONFIGURATION%\DiligentCoreAPITest.exe" --mode=d3d12_sw - if %ERRORLEVEL% NEQ 0 ( - set ERROR=%ERRORLEVEL% - ) + ("%1\UnitTests\DiligentCoreAPITest\%CONFIGURATION%\DiligentCoreAPITest.exe" --mode=d3d12_sw) || set /a ERROR=%ERROR%+100 ) exit /B %ERROR% REM use /B to exit the current batch script context, and not the command prompt process -- cgit v1.2.3