From 2e03da4f8dbfcb70ae8662d7062c777689d2ed60 Mon Sep 17 00:00:00 2001 From: Trevor Norris Date: Mon, 19 Jun 2017 23:21:33 -0600 Subject: [PATCH] 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 Reviewed-By: Refael Ackermann --- Makefile | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 825baa1ecb62a7..cd0bfd312224d2 100644 --- a/Makefile +++ b/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