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: #30727
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 MylesBorins committed Dec 17, 2019
1 parent f85ec19 commit 81b22dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion vcbuild.bat
Expand Up @@ -57,6 +57,7 @@ set v8_build_options=
set http2_debug=
set nghttp2_debug=
set link_module=
set exit_code=0

:next-arg
if "%1"=="" goto args-done
Expand Down Expand Up @@ -486,10 +487,12 @@ if defined skip_cctest goto run-test-py
if not exist %config%\cctest.exe goto run-test-py
echo running 'cctest %cctest_args%'
"%config%\cctest" %cctest_args%
if %errorlevel% neq 0 set exit_code=%errorlevel%
:run-test-py
REM when building a static library there's no binary to run tests
if defined enable_static goto test-v8
call :run-python tools\test.py %test_args%
if %errorlevel% neq 0 set exit_code=%errorlevel%

:test-v8
if not defined custom_v8_test goto lint-cpp
Expand Down Expand Up @@ -587,7 +590,7 @@ echo %cmd1%
exit /b %ERRORLEVEL%

:exit
goto :EOF
exit /b %exit_code%


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

0 comments on commit 81b22dd

Please sign in to comment.