Skip to content

Commit 595bdc7

Browse files
bzozBethGriggs
authored andcommitted
win, build: skip building cctest by default
vcbuild will build cctest only if it will be run, or for CI and release builds PR-URL: #21408 Reviewed-By: João Reis <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
1 parent 288d60c commit 595bdc7

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

vcbuild.bat

+12-4
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,14 @@ set http2_debug=
5656
set nghttp2_debug=
5757
set link_module=
5858
set no_cctest=
59+
set cctest=
5960
set openssl_no_asm=
6061
set doc=
6162

6263
:next-arg
6364
if "%1"=="" goto args-done
6465
if /i "%1"=="debug" set config=Debug&goto arg-ok
65-
if /i "%1"=="release" set config=Release&set ltcg=1&set "pch="&goto arg-ok
66+
if /i "%1"=="release" set config=Release&set ltcg=1&set "pch="&set cctest=1&goto arg-ok
6667
if /i "%1"=="clean" set target=Clean&goto arg-ok
6768
if /i "%1"=="ia32" set target_arch=x86&goto arg-ok
6869
if /i "%1"=="x86" set target_arch=x86&goto arg-ok
@@ -127,6 +128,7 @@ if /i "%1"=="no-NODE-OPTIONS" set no_NODE_OPTIONS=1&goto arg-ok
127128
if /i "%1"=="debug-nghttp2" set debug_nghttp2=1&goto arg-ok
128129
if /i "%1"=="link-module" set "link_module= --link-module=%2%link_module%"&goto arg-ok-2
129130
if /i "%1"=="no-cctest" set no_cctest=1&goto arg-ok
131+
if /i "%1"=="cctest" set cctest=1&goto arg-ok
130132
if /i "%1"=="openssl-no-asm" set openssl_no_asm=1&goto arg-ok
131133
if /i "%1"=="doc" set doc=1&goto arg-ok
132134

@@ -153,6 +155,7 @@ if defined build_release (
153155
set download_arg="--download=all"
154156
set i18n_arg=small-icu
155157
set projgen=1
158+
set cctest=1
156159
set ltcg=1
157160
set "pch="
158161
)
@@ -301,7 +304,12 @@ set "msbcpu=/m:2"
301304
if "%NUMBER_OF_PROCESSORS%"=="1" set "msbcpu=/m:1"
302305
set "msbplatform=Win32"
303306
if "%target_arch%"=="x64" set "msbplatform=x64"
304-
if "%target%"=="Build" if defined no_cctest set target=node
307+
if "%target%"=="Build" (
308+
if defined no_cctest set target=rename_node_bin_win
309+
if "%test_args%"=="" set target=rename_node_bin_win
310+
if defined cctest set target="Build"
311+
)
312+
if "%target%"=="rename_node_bin_win" if exist "%config%\cctest.exe" del "%config%\cctest.exe"
305313
msbuild node.sln %msbcpu% /t:%target% /p:Configuration=%config% /p:Platform=%msbplatform% /clp:NoSummary;NoItemAndPropertyList;Verbosity=minimal /nologo
306314
if errorlevel 1 (
307315
if not defined project_generated echo Building Node with reused solution failed. To regenerate project files use "vcbuild projgen"
@@ -531,7 +539,7 @@ if "%test_args%"=="" goto test-v8
531539
if "%config%"=="Debug" set test_args=--mode=debug %test_args%
532540
if "%config%"=="Release" set test_args=--mode=release %test_args%
533541
if defined no_cctest echo Skipping cctest because no-cctest was specified && goto run-test-py
534-
if not exist %config%\cctest.exe goto run-test-py
542+
if not exist "%config%\cctest.exe" echo cctest.exe not found. Run "vcbuild test" or "vcbuild cctest" to build it. && goto run-test-py
535543
echo running 'cctest %cctest_args%'
536544
"%config%\cctest" %cctest_args%
537545
:run-test-py
@@ -633,7 +641,7 @@ del .used_configure_flags
633641
goto exit
634642

635643
:help
636-
echo vcbuild.bat [debug/release] [msi] [doc] [test/test-ci/test-all/test-addons/test-addons-napi/test-benchmark/test-internet/test-pummel/test-simple/test-message/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-async-hooks/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [noetw] [noperfctr] [ltcg] [nopch] [licensetf] [sign] [ia32/x86/x64] [vs2017] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-js-ci/lint-md] [lint-md-build] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [no-cctest] [openssl-no-asm]
644+
echo vcbuild.bat [debug/release] [msi] [doc] [test/test-ci/test-all/test-addons/test-addons-napi/test-benchmark/test-internet/test-pummel/test-simple/test-message/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-async-hooks/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [noetw] [noperfctr] [ltcg] [nopch] [licensetf] [sign] [ia32/x86/x64] [vs2017] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-js-ci/lint-md] [lint-md-build] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [cctest] [no-cctest] [openssl-no-asm]
637645
echo Examples:
638646
echo vcbuild.bat : builds release build
639647
echo vcbuild.bat debug : builds debug build

0 commit comments

Comments
 (0)