Skip to content

Commit 81b22dd

Browse files
joaocgreisMylesBorins
authored andcommitted
build,win: propagate error codes in vcbuild
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>
1 parent f85ec19 commit 81b22dd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

vcbuild.bat

+4-1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ set v8_build_options=
5757
set http2_debug=
5858
set nghttp2_debug=
5959
set link_module=
60+
set exit_code=0
6061

6162
:next-arg
6263
if "%1"=="" goto args-done
@@ -486,10 +487,12 @@ if defined skip_cctest goto run-test-py
486487
if not exist %config%\cctest.exe goto run-test-py
487488
echo running 'cctest %cctest_args%'
488489
"%config%\cctest" %cctest_args%
490+
if %errorlevel% neq 0 set exit_code=%errorlevel%
489491
:run-test-py
490492
REM when building a static library there's no binary to run tests
491493
if defined enable_static goto test-v8
492494
call :run-python tools\test.py %test_args%
495+
if %errorlevel% neq 0 set exit_code=%errorlevel%
493496

494497
:test-v8
495498
if not defined custom_v8_test goto lint-cpp
@@ -587,7 +590,7 @@ echo %cmd1%
587590
exit /b %ERRORLEVEL%
588591

589592
:exit
590-
goto :EOF
593+
exit /b %exit_code%
591594

592595

593596
rem ***************

0 commit comments

Comments
 (0)