From b18c8d37022ce8aab1d6e40ceeaf45d9e0f4dca8 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 8df6cd95dfa37a..05383f8a4e9b19 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 @@ -629,9 +630,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 @@ -714,7 +717,7 @@ echo vcbuild.bat no-cctest : skip building cctest.exe goto exit :exit -goto :EOF +exit /b %exit_code% rem ***************