diff options
author | Benjamin Coe <ben@npmjs.com> | 2017-09-29 04:29:54 +0300 |
---|---|---|
committer | Michaƫl Zasso <targos@protonmail.com> | 2017-10-18 06:46:29 +0300 |
commit | a8d1a56bec446118e0e658cd75f89452436f0ce7 (patch) | |
tree | 834e1a79fc328f972aa2accbc2deb462dbb9b857 /Makefile | |
parent | 415821c309f47fd0b5817279ba02d4614a53e3a8 (diff) |
test: make it easier to run tests for subsystems
You can now run suites for subsystem using shorthand, e.g., http.
Switch to black-list of default test folders from white-list.
Tests run by 'make test', 'make coverage', etc., now configurable.
Stop running known_issues suite when collecting test coverage.
PR-URL: https://github.com/nodejs/node/pull/15450
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -10,7 +10,7 @@ TEST_CI_ARGS ?= STAGINGSERVER ?= node-www LOGLEVEL ?= silent OSTYPE := $(shell uname -s | tr '[A-Z]' '[a-z]') -COVTESTS ?= test +COVTESTS ?= test-cov GTEST_FILTER ?= "*" GNUMAKEFLAGS += --no-print-directory @@ -204,10 +204,20 @@ test: all $(PYTHON) tools/test.py --mode=release -J \ $(CI_ASYNC_HOOKS) \ $(CI_JS_SUITES) \ - $(CI_NATIVE_SUITES) + $(CI_NATIVE_SUITES) \ + known_issues $(MAKE) lint endif +test-cov: all + $(MAKE) build-addons + $(MAKE) build-addons-napi + # $(MAKE) cctest + $(PYTHON) tools/test.py --mode=release -J \ + $(CI_JS_SUITES) \ + $(CI_NATIVE_SUITES) + $(MAKE) lint + test-parallel: all $(PYTHON) tools/test.py --mode=release parallel -J @@ -336,7 +346,7 @@ test-all-valgrind: test-build CI_NATIVE_SUITES := addons addons-napi CI_ASYNC_HOOKS := async-hooks -CI_JS_SUITES := abort doctool es-module inspector known_issues message parallel pseudo-tty sequential +CI_JS_SUITES ?= default # Build and test addons without building anything else test-ci-native: LOGLEVEL := info @@ -349,7 +359,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_ASYNC_HOOKS) $(CI_JS_SUITES) + $(TEST_CI_ARGS) $(CI_ASYNC_HOOKS) known_issues # 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}'`; \ @@ -362,7 +372,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_ASYNC_HOOKS) $(CI_JS_SUITES) $(CI_NATIVE_SUITES) + $(TEST_CI_ARGS) $(CI_ASYNC_HOOKS) $(CI_JS_SUITES) known_issues # 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}'`; \ |