Skip to content

Commit

Permalink
build,win: propagate error codes in vcbuild
Browse files Browse the repository at this point in the history
Don't exit vcbuild with error code 0 when cctest fails.

Backport-PR-URL: #30726
PR-URL: #30724
Refs: nodejs/build#1996
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
  • Loading branch information
joaocgreis authored and BethGriggs committed Dec 3, 2019
1 parent c3e3862 commit 4d3ec1a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ set no_cctest=
set cctest=
set openssl_no_asm=
set doc=
set extra_msbuild_args=^
set extra_msbuild_args=
set exit_code=0

:next-arg
if "%1"=="" goto args-done
Expand Down Expand Up @@ -559,9 +560,11 @@ if defined no_cctest echo Skipping cctest because no-cctest was specified && got
if not exist "%config%\cctest.exe" echo cctest.exe not found. Run "vcbuild test" or "vcbuild cctest" to build it. && goto run-test-py
echo running 'cctest %cctest_args%'
"%config%\cctest" %cctest_args%
if %errorlevel% neq 0 set exit_code=%errorlevel%
:run-test-py
echo running 'python tools\test.py %test_args%'
python tools\test.py %test_args%
if %errorlevel% neq 0 set exit_code=%errorlevel%
goto test-v8

:test-v8
Expand Down Expand Up @@ -672,7 +675,7 @@ echo vcbuild.bat no-cctest : skip building cctest.exe
goto exit

:exit
goto :EOF
exit /b %exit_code%


rem ***************
Expand Down

0 comments on commit 4d3ec1a

Please sign in to comment.