| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -78,11 +78,17 @@ EXEEXT := $(shell $(PYTHON) -c \ | |||
| 78 | 78 | "import sys; print('.exe' if sys.platform == 'win32' else '')") | |
| 79 | 79 | ||
| 80 | 80 | NODE_EXE = node$(EXEEXT) | |
| 81 | - # Use $(PWD) so we can cd to anywhere before calling this | ||
| 82 | - NODE ?= "$(PWD)/$(NODE_EXE)" | ||
| 83 | 81 | NODE_G_EXE = node_g$(EXEEXT) | |
| 84 | 82 | NPM ?= ./deps/npm/bin/npm-cli.js | |
| 85 | 83 | ||
| 84 | + # Release build of node. | ||
| 85 | + # Use $(PWD) so we can cd to anywhere before calling this. | ||
| 86 | + NODE ?= "$(PWD)/$(NODE_EXE)" | ||
| 87 | + # Prefer $(OUT_NODE) when running tests. Use $(NODE) | ||
| 88 | + # when generating coverage reports or running toolings as | ||
| 89 | + # debug build is be slower. | ||
| 90 | + OUT_NODE ?= "$(PWD)/out/$(BUILDTYPE)/node$(EXEEXT)" | ||
| 91 | + | ||
| 86 | 92 | # Flags for packaging. | |
| 87 | 93 | BUILD_DOWNLOAD_FLAGS ?= --download=all | |
| 88 | 94 | BUILD_INTL_FLAGS ?= --with-intl=full-icu | |
@@ -108,8 +114,10 @@ available-node = \ | |||
| 108 | 114 | # just the debug build, run `make -C out BUILDTYPE=Debug` instead. | |
| 109 | 115 | ifeq ($(BUILDTYPE),Release) | |
| 110 | 116 | all: $(NODE_EXE) ## Build node in out/Release/node (Default). | |
| 117 | + $(OUT_NODE): $(NODE_EXE) | ||
| 111 | 118 | else | |
| 112 | 119 | all: $(NODE_EXE) $(NODE_G_EXE) | |
| 120 | + $(OUT_NODE): $(NODE_G_EXE) | ||
| 113 | 121 | endif | |
| 114 | 122 | ||
| 115 | 123 | .PHONY: help | |
@@ -293,7 +301,7 @@ coverage-report-js: ## Report JavaScript coverage results. | |||
| 293 | 301 | ||
| 294 | 302 | cctest: all ## Run the C++ tests using the built `cctest` executable. | |
| 295 | 303 | @out/$(BUILDTYPE)/$@ --gtest_filter=$(GTEST_FILTER) | |
| 296 | - $(NODE) ./test/embedding/test-embedding.js | ||
| 304 | + $(OUT_NODE) ./test/embedding/test-embedding.js | ||
| 297 | 305 | ||
| 298 | 306 | .PHONY: list-gtests | |
| 299 | 307 | list-gtests: ## List all available C++ gtests. | |
@@ -605,7 +613,7 @@ test-ci: | clear-stalled bench-addons-build build-addons build-js-native-api-tes | |||
| 605 | 613 | $(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \ | |
| 606 | 614 | --mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \ | |
| 607 | 615 | $(TEST_CI_ARGS) $(CI_JS_SUITES) $(CI_NATIVE_SUITES) $(CI_DOC) | |
| 608 | - $(NODE) ./test/embedding/test-embedding.js | ||
| 616 | + $(OUT_NODE) ./test/embedding/test-embedding.js | ||
| 609 | 617 | $(info Clean up any leftover processes, error if found.) | |
| 610 | 618 | ps awwx | grep Release/node | grep -v grep | cat | |
| 611 | 619 | @PS_OUT=`ps awwx | grep Release/node | grep -v grep | awk '{print $$1}'`; \ | |
@@ -651,7 +659,7 @@ test-wpt: all ## Run the Web Platform Tests. | |||
| 651 | 659 | test-wpt-report: ## Run the Web Platform Tests and generate a report. | |
| 652 | 660 | $(RM) -r out/wpt | |
| 653 | 661 | mkdir -p out/wpt | |
| 654 | - -WPT_REPORT=1 $(PYTHON) tools/test.py --shell $(NODE) $(PARALLEL_ARGS) wpt | ||
| 662 | + -WPT_REPORT=1 $(PYTHON) tools/test.py --shell $(OUT_NODE) $(PARALLEL_ARGS) wpt | ||
| 655 | 663 | $(NODE) "$$PWD/tools/merge-wpt-reports.mjs" | |
| 656 | 664 | ||
| 657 | 665 | .PHONY: test-internet | |
@@ -680,12 +688,12 @@ test-known-issues: all ## Run tests for known issues. | |||
| 680 | 688 | ||
| 681 | 689 | # Related CI job: node-test-npm | |
| 682 | 690 | .PHONY: test-npm | |
| 683 | - test-npm: $(NODE_EXE) ## Run the npm test suite on deps/npm. | ||
| 684 | - $(NODE) tools/test-npm-package --install --logfile=test-npm.tap deps/npm test | ||
| 691 | + test-npm: $(OUT_NODE) ## Run the npm test suite on deps/npm. | ||
| 692 | + $(OUT_NODE) tools/test-npm-package --install --logfile=test-npm.tap deps/npm test | ||
| 685 | 693 | ||
| 686 | 694 | .PHONY: test-npm-publish | |
| 687 | - test-npm-publish: $(NODE_EXE) ## Test the `npm publish` command. | ||
| 688 | - npm_package_config_publishtest=true $(NODE) deps/npm/test/run.js | ||
| 695 | + test-npm-publish: $(OUT_NODE) ## Test the `npm publish` command. | ||
| 696 | + npm_package_config_publishtest=true $(OUT_NODE) deps/npm/test/run.js | ||
| 689 | 697 | ||
| 690 | 698 | .PHONY: test-js-native-api | |
| 691 | 699 | test-js-native-api: test-build-js-native-api ## Run JS Native-API tests. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments