@@ -36,6 +36,7 @@ set release_urls_arg=
36
36
set build_release =
37
37
set enable_vtune_arg =
38
38
set configure_flags =
39
+ set build_addons =
39
40
40
41
:next-arg
41
42
if " %1 " == " " goto args-done
@@ -54,8 +55,9 @@ if /i "%1"=="nosnapshot" set nosnapshot=1&goto arg-ok
54
55
if /i " %1 " == " noetw" set noetw = 1& goto arg-ok
55
56
if /i " %1 " == " noperfctr" set noperfctr = 1& goto arg-ok
56
57
if /i " %1 " == " licensertf" set licensertf = 1& goto arg-ok
57
- if /i " %1 " == " test" set test_args = %test_args% sequential parallel message -J& set jslint=1& goto arg-ok
58
- if /i " %1 " == " test-ci" set test_args = %test_args% %test_ci_args% -p tap --logfile test.tap message sequential parallel& goto arg-ok
58
+ if /i " %1 " == " test" set test_args = %test_args% addons sequential parallel message -J& set jslint=1& set build_addons=1& goto arg-ok
59
+ if /i " %1 " == " test-ci" set test_args = %test_args% %test_ci_args% -p tap --logfile test.tap addons message sequential parallel& set build_addons=1& goto arg-ok
60
+ if /i " %1 " == " test-addons" set test_args = %test_args% addons& set build_addons=1& goto arg-ok
59
61
if /i " %1 " == " test-simple" set test_args = %test_args% sequential parallel -J& goto arg-ok
60
62
if /i " %1 " == " test-message" set test_args = %test_args% message& goto arg-ok
61
63
if /i " %1 " == " test-gc" set test_args = %test_args% gc& set buildnodeweak=1& goto arg-ok
@@ -91,6 +93,9 @@ if defined build_release (
91
93
set i18n_arg = small-icu
92
94
)
93
95
96
+ :: assign path to node_exe
97
+ set " node_exe = %config% \node.exe"
98
+
94
99
if " %config% " == " Debug" set configure_flags = %configure_flags% --debug
95
100
if defined nosnapshot set configure_flags = %configure_flags% --without-snapshot
96
101
if defined noetw set configure_flags = %configure_flags% --without-etw& set noetw_msi_arg = /p:NoETW=1
@@ -240,15 +245,36 @@ ssh -F %SSHCONFIG% %STAGINGSERVER% "touch nodejs/%DISTTYPEDIR%/v%FULLVERSION%/no
240
245
241
246
:build-node-weak
242
247
@ rem Build node-weak if required
243
- if " %buildnodeweak% " == " " goto run-tests
248
+ if " %buildnodeweak% " == " " goto build-addons
244
249
" %config% \node" deps\npm\node_modules\node-gyp\bin\node-gyp rebuild --directory=" %~dp0 test\gc\node_modules\weak" --nodedir=" %~dp0 ."
245
250
if errorlevel 1 goto build-node-weak-failed
246
- goto run-tests
251
+ goto build-addons
247
252
248
253
:build-node-weak-failed
249
254
echo Failed to build node-weak.
250
255
goto exit
251
256
257
+ :build-addons
258
+ if not defined build_addons goto run-tests
259
+ if not exist " %node_exe% " (
260
+ echo Failed to find node.exe
261
+ goto run-tests
262
+ )
263
+ echo Building add-ons
264
+ :: clear
265
+ for /d %%F in (test\addons\??_*) do (
266
+ rd /s /q %%F
267
+ )
268
+ :: generate
269
+ " %node_exe% " tools\doc\addon-verify.js
270
+ :: building addons
271
+ for /d %%F in (test\addons\*) do (
272
+ " %node_exe% " deps\npm\node_modules\node-gyp\bin\node-gyp rebuild ^
273
+ --directory=" %%F " ^
274
+ --nodedir=" %cd% "
275
+ )
276
+ goto run-tests
277
+
252
278
:run-tests
253
279
if " %test_args% " == " " goto jslint
254
280
if " %config% " == " Debug" set test_args = --mode=debug %test_args%
0 commit comments