From 81b22dd0bbbe4e2e10075f44af8ca2a817e47153 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Reis?= Date: Sat, 30 Nov 2019 01:13:48 +0000 Subject: [PATCH] build,win: propagate error codes in vcbuild Don't exit vcbuild with error code 0 when cctest fails. Backport-PR-URL: https://github.com/nodejs/node/pull/30727 PR-URL: https://github.com/nodejs/node/pull/30724 Refs: https://github.com/nodejs/build/issues/1996 Reviewed-By: Rod Vagg Reviewed-By: Sam Roberts Reviewed-By: Rich Trott --- vcbuild.bat | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vcbuild.bat b/vcbuild.bat index 1c965361d3706e..82c70662a1adc7 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -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 @@ -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 @@ -587,7 +590,7 @@ echo %cmd1% exit /b %ERRORLEVEL% :exit -goto :EOF +exit /b %exit_code% rem ***************