Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 26 additions & 26 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif
ARCHTYPE := $(shell uname -m | tr '[:upper:]' '[:lower:]')
COVTESTS ?= test-cov
COV_SKIP_TESTS ?= core_line_numbers.js,testFinalizer.js,test_function/test.js
GTEST_FILTER ?= "*"
GTEST_FILTER ?= *
GNUMAKEFLAGS += --no-print-directory
GCOV ?= gcov
PWD = $(CURDIR)
Expand All @@ -31,9 +31,9 @@ else
endif

ifdef ENABLE_V8_TAP
TAP_V8 := --junitout $(PWD)/v8-tap.xml
TAP_V8_INTL := --junitout $(PWD)/v8-intl-tap.xml
TAP_V8_BENCHMARKS := --junitout $(PWD)/v8-benchmarks-tap.xml
TAP_V8 := --junitout '$(PWD)/v8-tap.xml'
TAP_V8_INTL := --junitout '$(PWD)/v8-intl-tap.xml'
TAP_V8_BENCHMARKS := --junitout '$(PWD)/v8-benchmarks-tap.xml'
define convert_to_junit
@true
endef
Expand All @@ -47,12 +47,12 @@ ifdef ENABLE_CONVERT_V8_JSON_TO_XML
# By default, the V8's JSON test output only includes the tests which have
# failed. We use --slow-tests-cutoff to ensure that all tests are present
# in the output, including those which pass.
TAP_V8 := --json-test-results $(TAP_V8_JSON) --slow-tests-cutoff 1000000
TAP_V8_INTL := --json-test-results $(TAP_V8_INTL_JSON) --slow-tests-cutoff 1000000
TAP_V8_BENCHMARKS := --json-test-results $(TAP_V8_BENCHMARKS_JSON) --slow-tests-cutoff 1000000
TAP_V8 := --json-test-results '$(TAP_V8_JSON)' --slow-tests-cutoff 1000000
TAP_V8_INTL := --json-test-results '$(TAP_V8_INTL_JSON)' --slow-tests-cutoff 1000000
TAP_V8_BENCHMARKS := --json-test-results '$(TAP_V8_BENCHMARKS_JSON)' --slow-tests-cutoff 1000000

define convert_to_junit
export PATH="$(NO_BIN_OVERRIDE_PATH)" && \
PATH="$(NO_BIN_OVERRIDE_PATH)" \
$(PYTHON) tools/v8-json-to-junit.py < $(1) > $(1:.json=.xml)
endef
endif
Expand All @@ -79,7 +79,7 @@ EXEEXT := $(shell $(PYTHON) -c \

NODE_EXE = node$(EXEEXT)
# Use $(PWD) so we can cd to anywhere before calling this
NODE ?= "$(PWD)/$(NODE_EXE)"
NODE ?= $(PWD)/$(NODE_EXE)
NODE_G_EXE = node_g$(EXEEXT)
NPM ?= ./deps/npm/bin/npm-cli.js

Expand All @@ -94,8 +94,8 @@ V ?= 0

# Use -e to double check in case it's a broken link
available-node = \
if [ -x "$(NODE)" ] && [ -e "$(NODE)" ]; then \
"$(NODE)" $(1); \
if [ -x '$(NODE)' ] && [ -e '$(NODE)' ]; then \
'$(NODE)' $(1); \
elif [ -x `command -v node` ] && [ -e `command -v node` ] && [ `command -v node` ]; then \
`command -v node` $(1); \
else \
Expand Down Expand Up @@ -260,7 +260,7 @@ coverage-build: all ## Build coverage files.
coverage-build-js: ## Build JavaScript coverage files.
mkdir -p node_modules
if [ ! -d node_modules/c8 ]; then \
$(NODE) ./deps/npm install c8 --no-save --no-package-lock;\
'$(NODE)' ./deps/npm install c8 --no-save --no-package-lock;\
fi

.PHONY: coverage-test
Expand All @@ -287,13 +287,13 @@ coverage-test: coverage-build ## Run the tests and generate a coverage report.
.PHONY: coverage-report-js
coverage-report-js: ## Report JavaScript coverage results.
-$(MAKE) coverage-build-js
$(NODE) ./node_modules/.bin/c8 report
'$(NODE)' ./node_modules/.bin/c8 report

.PHONY: cctest

cctest: all ## Run the C++ tests using the built `cctest` executable.
@out/$(BUILDTYPE)/$@ --gtest_filter=$(GTEST_FILTER)
$(NODE) ./test/embedding/test-embedding.js
@out/$(BUILDTYPE)/$@ --gtest_filter="$(GTEST_FILTER)"
'$(NODE)' ./test/embedding/test-embedding.js

.PHONY: list-gtests
list-gtests: ## List all available C++ gtests.
Expand Down Expand Up @@ -385,7 +385,7 @@ test/addons/.docbuildstamp: $(DOCBUILDSTAMP_PREREQS) tools/doc/node_modules
echo "Skipping .docbuildstamp (no crypto and/or no ICU)"; \
else \
$(RM) -r test/addons/??_*/; \
[ -x $(NODE) ] && $(NODE) $< || node $< ; \
[ -x '$(NODE)' ] && '$(NODE)' $< || node $< ; \
[ $$? -eq 0 ] && touch $@; \
fi

Expand Down Expand Up @@ -605,7 +605,7 @@ test-ci: | clear-stalled bench-addons-build build-addons build-js-native-api-tes
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
$(TEST_CI_ARGS) $(CI_JS_SUITES) $(CI_NATIVE_SUITES) $(CI_DOC)
$(NODE) ./test/embedding/test-embedding.js
'$(NODE)' ./test/embedding/test-embedding.js
$(info Clean up any leftover processes, error if found.)
ps awwx | grep Release/node | grep -v grep | cat
@PS_OUT=`ps awwx | grep Release/node | grep -v grep | awk '{print $$1}'`; \
Expand Down Expand Up @@ -651,8 +651,8 @@ test-wpt: all ## Run the Web Platform Tests.
test-wpt-report: ## Run the Web Platform Tests and generate a report.
$(RM) -r out/wpt
mkdir -p out/wpt
-WPT_REPORT=1 $(PYTHON) tools/test.py --shell $(NODE) $(PARALLEL_ARGS) wpt
$(NODE) "$$PWD/tools/merge-wpt-reports.mjs"
-WPT_REPORT=1 $(PYTHON) tools/test.py --shell '$(NODE)' $(PARALLEL_ARGS) wpt
'$(NODE)' "$$PWD/tools/merge-wpt-reports.mjs"

.PHONY: test-internet
test-internet: all ## Run internet tests.
Expand All @@ -672,7 +672,7 @@ test-doc: doc-only lint-md ## Build, lint, and verify the docs.

.PHONY: test-doc-ci
test-doc-ci: doc-only ## Build, lint, and verify the docs (CI).
$(PYTHON) tools/test.py --shell $(NODE) $(TEST_CI_ARGS) $(PARALLEL_ARGS) doctool
$(PYTHON) tools/test.py --shell '$(NODE)' $(TEST_CI_ARGS) $(PARALLEL_ARGS) doctool

.PHONY: test-known-issues
test-known-issues: all ## Run tests for known issues.
Expand All @@ -681,11 +681,11 @@ test-known-issues: all ## Run tests for known issues.
# Related CI job: node-test-npm
.PHONY: test-npm
test-npm: $(NODE_EXE) ## Run the npm test suite on deps/npm.
$(NODE) tools/test-npm-package --install --logfile=test-npm.tap deps/npm test
'$(NODE)' tools/test-npm-package --install --logfile=test-npm.tap deps/npm test

.PHONY: test-npm-publish
test-npm-publish: $(NODE_EXE) ## Test the `npm publish` command.
npm_package_config_publishtest=true $(NODE) deps/npm/test/run.js
npm_package_config_publishtest=true '$(NODE)' deps/npm/test/run.js

.PHONY: test-js-native-api
test-js-native-api: test-build-js-native-api ## Run JS Native-API tests.
Expand Down Expand Up @@ -829,7 +829,7 @@ out/doc/api/assets/%: doc/api_assets/% | out/doc/api/assets
@cp $< $@ ; $(RM) out/doc/api/assets/README.md


run-npm-ci = $(PWD)/$(NPM) ci
run-npm-ci = '$(PWD)/$(NPM)' ci

LINK_DATA = out/doc/apilinks.json
VERSIONS_DATA = out/previous-doc-versions.json
Expand Down Expand Up @@ -1169,7 +1169,7 @@ endif
$(MACOSOUTDIR)/dist/npm/usr/local/lib/node_modules
unlink $(MACOSOUTDIR)/dist/node/usr/local/bin/npm
unlink $(MACOSOUTDIR)/dist/node/usr/local/bin/npx
$(NODE) tools/license2rtf.mjs < LICENSE > \
'$(NODE)' tools/license2rtf.mjs < LICENSE > \
$(MACOSOUTDIR)/installer/productbuild/Resources/license.rtf
cp doc/osx_installer_logo.png $(MACOSOUTDIR)/installer/productbuild/Resources
pkgbuild --version $(FULLVERSION) \
Expand Down Expand Up @@ -1667,8 +1667,8 @@ HAS_DOCKER ?= $(shell command -v docker > /dev/null 2>&1; [ $$? -eq 0 ] && echo

.PHONY: gen-openssl
ifeq ($(HAS_DOCKER), 1)
DOCKER_COMMAND ?= docker run --rm -u $(shell id -u) -v $(PWD):/node
IS_IN_WORKTREE = $(shell grep '^gitdir: ' $(PWD)/.git 2>/dev/null)
DOCKER_COMMAND ?= docker run --rm -u $(shell id -u) -v '$(PWD):/node'
IS_IN_WORKTREE = $(shell grep '^gitdir: ' '$(PWD)/.git' 2>/dev/null)
GIT_WORKTREE_COMMON = $(shell git rev-parse --git-common-dir)
DOCKER_COMMAND += $(if $(IS_IN_WORKTREE), -v $(GIT_WORKTREE_COMMON):$(GIT_WORKTREE_COMMON))
gen-openssl: ## Generate platform dependent openssl files (requires docker).
Expand Down
Loading