Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: enable NODE_DEBUG=test by default for tests #32696

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
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
19 changes: 13 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ GNUMAKEFLAGS += --no-print-directory
GCOV ?= gcov
PWD = $(CURDIR)
BUILD_WITH ?= make
CI_DEBUG_TEST ?= NODE_DEBUG=test,${NODE_DEBUG}

ifdef JOBS
PARALLEL_ARGS = -j $(JOBS)
Expand Down Expand Up @@ -536,16 +537,20 @@ endif
# Related CI job: node-test-commit-arm-fanned
test-ci-native: LOGLEVEL := info
test-ci-native: | test/addons/.buildstamp test/js-native-api/.buildstamp test/node-api/.buildstamp test/abort/.buildstamp
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
$(CI_DEBUG_TEST) $(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap \
--logfile test.tap \
--mode=$(BUILDTYPE_LOWER) \
--flaky-tests=$(FLAKY_TESTS) \
$(TEST_CI_ARGS) $(CI_NATIVE_SUITES)

.PHONY: test-ci-js
# This target should not use a native compiler at all
# Related CI job: node-test-commit-arm-fanned
test-ci-js: | clear-stalled
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
$(CI_DEBUG_TEST) $(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap \
--logfile test.tap \
--mode=$(BUILDTYPE_LOWER) \
--flaky-tests=$(FLAKY_TESTS) \
$(TEST_CI_ARGS) $(CI_JS_SUITES)
@echo "Clean up any leftover processes, error if found."
ps awwx | grep Release/node | grep -v grep | cat
Expand All @@ -559,8 +564,10 @@ test-ci-js: | clear-stalled
test-ci: LOGLEVEL := info
test-ci: | clear-stalled build-addons build-abort-tests build-js-native-api-tests build-node-api-tests doc-only
out/Release/cctest --gtest_output=xml:out/junit/cctest.xml
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
--mode=$(BUILDTYPE_LOWER) --flaky-tests=$(FLAKY_TESTS) \
$(CI_DEBUG_TEST) $(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)
out/Release/embedtest 'require("./test/embedding/test-embedding.js")'
@echo "Clean up any leftover processes, error if found."
Expand Down
4 changes: 4 additions & 0 deletions vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ cd %~dp0
set CI_NATIVE_SUITES=addons js-native-api node-api abort
set CI_JS_SUITES=default
set CI_DOC=doctool
echo %CI_DEBUG_TEST%
@rem Same as the test-ci target in Makefile
set "common_test_suites=%CI_JS_SUITES% %CI_NATIVE_SUITES% %CI_DOC%&set build_addons=1&set build_js_native_api_tests=1&set build_node_api_tests=1&set build_aborts_tests=1"

Expand Down Expand Up @@ -63,6 +64,7 @@ set http2_debug=
set nghttp2_debug=
set link_module=
set no_cctest=
set no_debug_test=
set cctest=
set openssl_no_asm=
set doc=
Expand Down Expand Up @@ -143,6 +145,7 @@ if /i "%1"=="no-NODE-OPTIONS" set no_NODE_OPTIONS=1&goto arg-ok
if /i "%1"=="debug-nghttp2" set debug_nghttp2=1&goto arg-ok
if /i "%1"=="link-module" set "link_module= --link-module=%2%link_module%"&goto arg-ok-2
if /i "%1"=="no-cctest" set no_cctest=1&goto arg-ok
if /i "%i"=="no-debug-test" set no_debug_test=1&goto arg-ok
if /i "%1"=="cctest" set cctest=1&goto arg-ok
if /i "%1"=="openssl-no-asm" set openssl_no_asm=1&goto arg-ok
if /i "%1"=="doc" set doc=1&goto arg-ok
Expand Down Expand Up @@ -658,6 +661,7 @@ echo running 'cctest %cctest_args%'
if %errorlevel% neq 0 set exit_code=%errorlevel%
:run-test-py
echo running 'python tools\test.py %test_args%'
if no_debug_test neq 1 set NODE_DEBUG=test
python tools\test.py %test_args%
if %errorlevel% neq 0 set exit_code=%errorlevel%
goto test-v8
Expand Down