From 0aae502c67071a053e1ae0ede367c605959ee00b 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. 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 677978cb3ed7f9..1e142a658bc68c 100644 --- a/vcbuild.bat +++ b/vcbuild.bat @@ -68,6 +68,7 @@ set cctest= set openssl_no_asm= set doc= set extra_msbuild_args= +set exit_code=0 :next-arg if "%1"=="" goto args-done @@ -633,9 +634,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 @@ -715,7 +718,7 @@ echo vcbuild.bat no-cctest : skip building cctest.exe goto exit :exit -goto :EOF +exit /b %exit_code% rem ***************