Browse Source

build: add test-with-async-hooks

The new test-with-async-hooks runs all normal tests (except async-hooks)
with the environment variable NODE_TEST_WITH_ASYNC_HOOKS set. These
extra checks do a minimum check to make sure async_hooks operates
normally under all other tests. e.g. if init() or destroy() is called
twice for the same id.

Also move test "async-hooks" from CI_JS_SUITES into its own
CI_ASYNC_HOOKS. Makes it cleaner to add, instead of supplying a massive
list of tests that may change in the future.

PR-URL: https://github.com/nodejs/node/pull/14208
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
canary-base
Trevor Norris 8 years ago
parent
commit
4321206c5b
No known key found for this signature in database GPG Key ID: 251CA676820DC7F3
  1. 16
      Makefile

16
Makefile

@ -202,6 +202,7 @@ test: all
$(MAKE) build-addons-napi
$(MAKE) cctest
$(PYTHON) tools/test.py --mode=release -J \
$(CI_ASYNC_HOOKS) \
$(CI_JS_SUITES) \
$(CI_NATIVE_SUITES)
$(MAKE) lint
@ -334,7 +335,8 @@ test-all-valgrind: test-build
$(PYTHON) tools/test.py --mode=debug,release --valgrind
CI_NATIVE_SUITES := addons addons-napi
CI_JS_SUITES := abort async-hooks doctool inspector known_issues message parallel pseudo-tty sequential
CI_ASYNC_HOOKS := async-hooks
CI_JS_SUITES := abort doctool inspector known_issues message parallel pseudo-tty sequential
# Build and test addons without building anything else
test-ci-native: LOGLEVEL := info
@ -347,7 +349,7 @@ test-ci-native: | test/addons/.buildstamp test/addons-napi/.buildstamp
test-ci-js: | clear-stalled
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
--mode=release --flaky-tests=$(FLAKY_TESTS) \
$(TEST_CI_ARGS) $(CI_JS_SUITES)
$(TEST_CI_ARGS) $(CI_ASYNC_HOOKS) $(CI_JS_SUITES)
# 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}'`; \
@ -360,7 +362,7 @@ test-ci: | clear-stalled build-addons build-addons-napi
out/Release/cctest --gtest_output=tap:cctest.tap
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
--mode=release --flaky-tests=$(FLAKY_TESTS) \
$(TEST_CI_ARGS) $(CI_JS_SUITES) $(CI_NATIVE_SUITES)
$(TEST_CI_ARGS) $(CI_ASYNC_HOOKS) $(CI_JS_SUITES) $(CI_NATIVE_SUITES)
# 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}'`; \
@ -434,6 +436,14 @@ test-timers-clean:
test-async-hooks:
$(PYTHON) tools/test.py --mode=release async-hooks
test-with-async-hooks:
$(MAKE) build-addons
$(MAKE) build-addons-napi
$(MAKE) cctest
NODE_TEST_WITH_ASYNC_HOOKS=1 $(PYTHON) tools/test.py --mode=release -J \
$(CI_JS_SUITES) \
$(CI_NATIVE_SUITES)
ifneq ("","$(wildcard deps/v8/tools/run-tests.py)")
test-v8: v8

Loading…
Cancel
Save