From: Bruce Forstall Date: Thu, 22 Oct 2020 16:05:33 +0000 (-0700) Subject: Bring back missing Exit_Failure case (#43665) X-Git-Tag: submit/tizen/20210909.063632~4972 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c6bf8eb835b58c6bbbf1dc163ac026e97a9afdb1;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Bring back missing Exit_Failure case (#43665) This script label and code was removed in a previous change even though it is still required. Bring it back. --- diff --git a/src/tests/build.cmd b/src/tests/build.cmd index 3d5394c..ea6d47d 100644 --- a/src/tests/build.cmd +++ b/src/tests/build.cmd @@ -206,7 +206,7 @@ if defined __SkipStressDependencies goto skipstressdependencies call "%__RepoRootDir%\src\tests\Common\setup-stress-dependencies.cmd" /arch %__BuildArch% /outputdir %__BinDir% if errorlevel 1 ( echo %__ErrMsgPrefix%%__MsgPrefix%Error: setup-stress-dependencies failed. - goto :Exit_Failure + exit /b 1 ) :skipstressdependencies @@ -674,3 +674,10 @@ if %__exitCode% neq 0 ( move "%__CrossgenOutputDir%\*.dll" %CORE_ROOT% > nul exit /b 0 + +REM Exit_Failure: +REM This is necessary because of a(n apparent) bug in the FOR /L command. Under certain circumstances, +REM such as when this script is invoke with CMD /C "build.cmd", a non-zero exit directly from +REM within the loop body will not propagate to the caller. For some reason, goto works around it. +:Exit_Failure +exit /b 1