@@ -171,6 +171,7 @@ uninstall: ## Uninstalls node from $PREFIX (default=/usr/local). |
171 | 171 | $(PYTHON) tools/install.py $@ '$(DESTDIR)' '$(PREFIX)' |
172 | 172 |
|
173 | 173 | .PHONY: clean |
| 174 | +.NOTPARALLEL: clean |
174 | 175 | clean: ## Remove build artifacts. |
175 | 176 | $(RM) -r out/Makefile $(NODE_EXE) $(NODE_G_EXE) out/$(BUILDTYPE)/$(NODE_EXE) \ |
176 | 177 | out/$(BUILDTYPE)/node.exp |
@@ -183,12 +184,14 @@ clean: ## Remove build artifacts. |
183 | 184 | $(MAKE) bench-addons-clean |
184 | 185 |
|
185 | 186 | .PHONY: testclean |
| 187 | +.NOTPARALLEL: testclean |
186 | 188 | testclean: |
187 | 189 | # Next one is legacy remove this at some point |
188 | 190 | $(RM) -r test/tmp* |
189 | 191 | $(RM) -r test/.tmp* |
190 | 192 |
|
191 | 193 | .PHONY: distclean |
| 194 | +.NOTPARALLEL: distclean |
192 | 195 | distclean: |
193 | 196 | $(RM) -r out |
194 | 197 | $(RM) config.gypi icu_config.gypi config_fips.gypi |
@@ -203,6 +206,7 @@ distclean: |
203 | 206 | check: test |
204 | 207 |
|
205 | 208 | .PHONY: coverage-clean |
| 209 | +.NOTPARALLEL: coverage-clean |
206 | 210 | # Remove files generated by running coverage, put the non-instrumented lib back |
207 | 211 | # in place |
208 | 212 | coverage-clean: |
@@ -316,19 +320,23 @@ test-only: all ## For a quick test, does not run linter or build docs. |
316 | 320 | $(MAKE) tooltest |
317 | 321 |
|
318 | 322 | # Used by `make coverage-test` |
| 323 | +.PHONY: test-cov |
319 | 324 | test-cov: all |
320 | 325 | $(MAKE) build-addons |
321 | 326 | $(MAKE) build-js-native-api-tests |
322 | 327 | $(MAKE) build-node-api-tests |
323 | 328 | $(MAKE) cctest |
324 | 329 | CI_SKIP_TESTS=$(COV_SKIP_TESTS) $(MAKE) jstest |
325 | 330 |
|
| 331 | +.PHONY: test-parallel |
326 | 332 | test-parallel: all |
327 | 333 | $(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) parallel |
328 | 334 |
|
| 335 | +.PHONY: test-valgrind |
329 | 336 | test-valgrind: all |
330 | 337 | $(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) --valgrind sequential parallel message |
331 | 338 |
|
| 339 | +.PHONY: test-check-deopts |
332 | 340 | test-check-deopts: all |
333 | 341 | $(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) --check-deopts parallel sequential |
334 | 342 |
|
@@ -457,16 +465,20 @@ clear-stalled: |
457 | 465 | echo $${PS_OUT} | xargs kill -9; \ |
458 | 466 | fi |
459 | 467 |
|
| 468 | +.PHONY: test-build |
460 | 469 | test-build: | all build-addons build-js-native-api-tests build-node-api-tests |
461 | 470 |
|
| 471 | +.PHONY: test-build-js-native-api |
462 | 472 | test-build-js-native-api: all build-js-native-api-tests |
463 | 473 |
|
| 474 | +.PHONY: test-build-node-api |
464 | 475 | test-build-node-api: all build-node-api-tests |
465 | 476 |
|
466 | 477 | .PHONY: test-all |
467 | 478 | test-all: test-build ## Run default tests with both Debug and Release builds. |
468 | 479 | $(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=debug,release |
469 | 480 |
|
| 481 | +.PHONY: test-all-valgrind |
470 | 482 | test-all-valgrind: test-build |
471 | 483 | $(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=debug,release --valgrind |
472 | 484 |
|
@@ -544,30 +556,39 @@ build-ci: |
544 | 556 | run-ci: build-ci |
545 | 557 | $(MAKE) test-ci -j1 |
546 | 558 |
|
| 559 | +.PHONY: test-release |
547 | 560 | test-release: test-build |
548 | 561 | $(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) |
549 | 562 |
|
| 563 | +.PHONY: test-debug |
550 | 564 | test-debug: test-build |
551 | 565 | $(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=debug |
552 | 566 |
|
| 567 | +.PHONY: test-message |
553 | 568 | test-message: test-build |
554 | 569 | $(PYTHON) tools/test.py $(PARALLEL_ARGS) message |
555 | 570 |
|
| 571 | +.PHONY: test-wpt |
556 | 572 | test-wpt: all |
557 | 573 | $(PYTHON) tools/test.py $(PARALLEL_ARGS) wpt |
558 | 574 |
|
| 575 | +.PHONY: test-simple |
559 | 576 | test-simple: | cctest # Depends on 'all'. |
560 | 577 | $(PYTHON) tools/test.py $(PARALLEL_ARGS) parallel sequential |
561 | 578 |
|
| 579 | +.PHONY: test-pummel |
562 | 580 | test-pummel: all |
563 | 581 | $(PYTHON) tools/test.py $(PARALLEL_ARGS) pummel |
564 | 582 |
|
| 583 | +.PHONY: test-internet |
565 | 584 | test-internet: all |
566 | 585 | $(PYTHON) tools/test.py $(PARALLEL_ARGS) internet |
567 | 586 |
|
| 587 | +.PHONY: test-benchmark |
568 | 588 | test-benchmark: | bench-addons-build |
569 | 589 | $(PYTHON) tools/test.py $(PARALLEL_ARGS) benchmark |
570 | 590 |
|
| 591 | +.PHONY: test-tick-processor |
571 | 592 | test-tick-processor: all |
572 | 593 | $(PYTHON) tools/test.py $(PARALLEL_ARGS) tick-processor |
573 | 594 |
|
@@ -588,13 +609,16 @@ test-doc: doc-only lint-md ## Builds, lints, and verifies the docs. |
588 | 609 | test-doc-ci: doc-only |
589 | 610 | $(PYTHON) tools/test.py --shell $(NODE) $(TEST_CI_ARGS) $(PARALLEL_ARGS) doctool |
590 | 611 |
|
| 612 | +.PHONY: test-known-issues |
591 | 613 | test-known-issues: all |
592 | 614 | $(PYTHON) tools/test.py $(PARALLEL_ARGS) known_issues |
593 | 615 |
|
594 | 616 | # Related CI job: node-test-npm |
| 617 | +.PHONY: test-npm |
595 | 618 | test-npm: $(NODE_EXE) ## Run the npm test suite on deps/npm. |
596 | 619 | $(NODE) tools/test-npm-package --install --logfile=test-npm.tap deps/npm test |
597 | 620 |
|
| 621 | +.PHONY: test-npm-publish |
598 | 622 | test-npm-publish: $(NODE_EXE) |
599 | 623 | npm_package_config_publishtest=true $(NODE) deps/npm/test/run.js |
600 | 624 |
|
@@ -603,6 +627,7 @@ test-js-native-api: test-build-js-native-api |
603 | 627 | $(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) js-native-api |
604 | 628 |
|
605 | 629 | .PHONY: test-js-native-api-clean |
| 630 | +.NOTPARALLEL: test-js-native-api-clean |
606 | 631 | test-js-native-api-clean: |
607 | 632 | $(RM) -r test/js-native-api/*/build |
608 | 633 | $(RM) test/js-native-api/.buildstamp |
@@ -612,6 +637,7 @@ test-node-api: test-build-node-api |
612 | 637 | $(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) node-api |
613 | 638 |
|
614 | 639 | .PHONY: test-node-api-clean |
| 640 | +.NOTPARALLEL: test-node-api-clean |
615 | 641 | test-node-api-clean: |
616 | 642 | $(RM) -r test/node-api/*/build |
617 | 643 | $(RM) test/node-api/.buildstamp |
@@ -621,16 +647,19 @@ test-addons: test-build test-js-native-api test-node-api |
621 | 647 | $(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) addons |
622 | 648 |
|
623 | 649 | .PHONY: test-addons-clean |
| 650 | +.NOTPARALLEL: test-addons-clean |
624 | 651 | test-addons-clean: |
625 | 652 | $(RM) -r test/addons/??_*/ |
626 | 653 | $(RM) -r test/addons/*/build |
627 | 654 | $(RM) test/addons/.buildstamp test/addons/.docbuildstamp |
628 | 655 | $(MAKE) test-js-native-api-clean |
629 | 656 | $(MAKE) test-node-api-clean |
630 | 657 |
|
| 658 | +.PHONY: test-async-hooks |
631 | 659 | test-async-hooks: |
632 | 660 | $(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=$(BUILDTYPE_LOWER) async-hooks |
633 | 661 |
|
| 662 | +.PHONY: test-with-async-hooks |
634 | 663 | test-with-async-hooks: |
635 | 664 | $(MAKE) build-addons |
636 | 665 | $(MAKE) build-js-native-api-tests |
@@ -783,6 +812,7 @@ docserve: $(apidocs_html) $(apiassets) |
783 | 812 | @$(PYTHON) -m http.server 8000 --bind 127.0.0.1 --directory out/doc/api |
784 | 813 |
|
785 | 814 | .PHONY: docclean |
| 815 | +.NOTPARALLEL: docclean |
786 | 816 | docclean: |
787 | 817 | $(RM) -r out/doc |
788 | 818 | $(RM) "$(VERSIONS_DATA)" |
@@ -951,6 +981,7 @@ XZ_COMPRESSION ?= 9e |
951 | 981 | PKG=$(TARNAME).pkg |
952 | 982 | MACOSOUTDIR=out/macos |
953 | 983 |
|
| 984 | +.PHONY: check-xz |
954 | 985 | ifeq ($(SKIP_XZ), 1) |
955 | 986 | check-xz: |
956 | 987 | $(info SKIP_XZ=1 supplied, skipping .tar.xz creation) |
@@ -1086,6 +1117,7 @@ endif |
1086 | 1117 | # Builds the macOS installer for releases. |
1087 | 1118 | pkg: $(PKG) |
1088 | 1119 |
|
| 1120 | +.PHONY: corepack-update |
1089 | 1121 | corepack-update: |
1090 | 1122 | rm -rf /tmp/node-corepack-clone |
1091 | 1123 | git clone 'https://github.com/nodejs/corepack.git' /tmp/node-corepack-clone |
@@ -1094,6 +1126,7 @@ corepack-update: |
1094 | 1126 | cd deps/corepack && tar xf /tmp/node-corepack-clone/package.tgz --strip-components=1 |
1095 | 1127 | chmod +x deps/corepack/shims/* |
1096 | 1128 |
|
| 1129 | +.PHONY: pkg-upload |
1097 | 1130 | # Note: this is strictly for release builds on release machines only. |
1098 | 1131 | pkg-upload: pkg |
1099 | 1132 | ssh $(STAGINGSERVER) "mkdir -p nodejs/$(DISTTYPEDIR)/$(FULLVERSION)" |
@@ -1142,6 +1175,7 @@ endif |
1142 | 1175 | .PHONY: tar |
1143 | 1176 | tar: $(TARBALL) ## Create a source tarball. |
1144 | 1177 |
|
| 1178 | +.PHONY: tar-upload |
1145 | 1179 | # Note: this is strictly for release builds on release machines only. |
1146 | 1180 | tar-upload: tar |
1147 | 1181 | ssh $(STAGINGSERVER) "mkdir -p nodejs/$(DISTTYPEDIR)/$(FULLVERSION)" |
@@ -1154,6 +1188,7 @@ ifeq ($(XZ), 1) |
1154 | 1188 | ssh $(STAGINGSERVER) "touch nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/$(TARNAME).tar.xz.done" |
1155 | 1189 | endif |
1156 | 1190 |
|
| 1191 | +.PHONY: doc-upload |
1157 | 1192 | # Note: this is strictly for release builds on release machines only. |
1158 | 1193 | doc-upload: doc |
1159 | 1194 | ssh $(STAGINGSERVER) "mkdir -p nodejs/$(DISTTYPEDIR)/$(FULLVERSION)/docs/" |
@@ -1179,8 +1214,10 @@ ifeq ($(XZ), 1) |
1179 | 1214 | endif |
1180 | 1215 | $(RM) $(TARNAME)-headers.tar |
1181 | 1216 |
|
| 1217 | +.PHONY: tar-headers |
1182 | 1218 | tar-headers: $(TARBALL)-headers ## Build the node header tarball. |
1183 | 1219 |
|
| 1220 | +.PHONY: tar-headers-upload |
1184 | 1221 | tar-headers-upload: tar-headers |
1185 | 1222 | ssh $(STAGINGSERVER) "mkdir -p nodejs/$(DISTTYPEDIR)/$(FULLVERSION)" |
1186 | 1223 | chmod 664 $(TARNAME)-headers.tar.gz |
@@ -1224,6 +1261,7 @@ endif |
1224 | 1261 | # This requires NODE_VERSION_IS_RELEASE defined as 1 in src/node_version.h. |
1225 | 1262 | binary: $(BINARYTAR) ## Build release binary tarballs. |
1226 | 1263 |
|
| 1264 | +.PHONY: binary-upload |
1227 | 1265 | # Note: this is strictly for release builds on release machines only. |
1228 | 1266 | binary-upload: binary |
1229 | 1267 | ssh $(STAGINGSERVER) "mkdir -p nodejs/$(DISTTYPEDIR)/$(FULLVERSION)" |
@@ -1246,6 +1284,7 @@ bench bench-all: bench-addons-build |
1246 | 1284 | bench-addons-build: | $(NODE_EXE) benchmark/napi/.buildstamp |
1247 | 1285 |
|
1248 | 1286 | .PHONY: bench-addons-clean |
| 1287 | +.NOTPARALLEL: bench-addons-clean |
1249 | 1288 | bench-addons-clean: |
1250 | 1289 | $(RM) -r benchmark/napi/*/build |
1251 | 1290 | $(RM) benchmark/napi/.buildstamp |
@@ -1256,6 +1295,7 @@ lint-md-rollup: |
1256 | 1295 | cd tools/lint-md && npm ci && npm run build |
1257 | 1296 |
|
1258 | 1297 | .PHONY: lint-md-clean |
| 1298 | +.NOTPARALLEL: lint-md-clean |
1259 | 1299 | lint-md-clean: |
1260 | 1300 | $(RM) -r tools/lint-md/node_modules |
1261 | 1301 | $(RM) tools/.*mdlintstamp |
@@ -1372,9 +1412,12 @@ LINT_CPP_FILES = $(filter-out $(LINT_CPP_EXCLUDE), $(wildcard \ |
1372 | 1412 | # and the actual filename is generated so it won't match header guards |
1373 | 1413 | ADDON_DOC_LINT_FLAGS=-whitespace/ending_newline,-build/header_guard |
1374 | 1414 |
|
| 1415 | +.PHONY: format-cpp-build |
1375 | 1416 | format-cpp-build: |
1376 | 1417 | cd tools/clang-format && $(call available-node,$(run-npm-ci)) |
1377 | 1418 |
|
| 1419 | +.PHONY: format-cpp-clean |
| 1420 | +.NOTPARALLEL: format-cpp-clean |
1378 | 1421 | format-cpp-clean: |
1379 | 1422 | $(RM) -r tools/clang-format/node_modules |
1380 | 1423 |
|
@@ -1434,8 +1477,8 @@ lint-py-build: |
1434 | 1477 | $(PYTHON) -m pip install --no-user --upgrade -t tools/pip/site-packages flake8 || \ |
1435 | 1478 | $(PYTHON) -m pip install --no-user --upgrade --system -t tools/pip/site-packages flake8 |
1436 | 1479 |
|
1437 | | -ifneq ("","$(wildcard tools/pip/site-packages/flake8)") |
1438 | 1480 | .PHONY: lint-py |
| 1481 | +ifneq ("","$(wildcard tools/pip/site-packages/flake8)") |
1439 | 1482 | # Lints the Python code with flake8. |
1440 | 1483 | # Flag the build if there are Python syntax errors or undefined names |
1441 | 1484 | lint-py: |
@@ -1500,6 +1543,7 @@ lint-clean: |
1500 | 1543 |
|
1501 | 1544 | HAS_DOCKER ?= $(shell command -v docker > /dev/null 2>&1; [ $$? -eq 0 ] && echo 1 || echo 0) |
1502 | 1545 |
|
| 1546 | +.PHONY: gen-openssl |
1503 | 1547 | ifeq ($(HAS_DOCKER), 1) |
1504 | 1548 | DOCKER_COMMAND ?= docker run -it -v $(PWD):/node |
1505 | 1549 | IS_IN_WORKTREE = $(shell grep '^gitdir: ' $(PWD)/.git 2>/dev/null) |
|