Skip to content

Commit 95e9c06

Browse files
jbergstroemMylesBorins
authored andcommitted
build: allow test-ci to run tests in parallel
Run tests in parallel if the environment variable JOBS (which should contain a number of parallel jobs) is set. PR-URL: #6208 Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
1 parent 713f6ff commit 95e9c06

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

Makefile

+9-4
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ PREFIX ?= /usr/local
88
FLAKY_TESTS ?= run
99
TEST_CI_ARGS ?=
1010
STAGINGSERVER ?= node-www
11-
1211
OSTYPE := $(shell uname -s | tr '[A-Z]' '[a-z]')
1312

13+
ifdef JOBS
14+
PARALLEL_ARGS = -j $(JOBS)
15+
endif
16+
1417
ifdef QUICKCHECK
1518
QUICKCHECK_ARG := --quickcheck
1619
endif
@@ -168,7 +171,8 @@ test-all-valgrind: test-build
168171
$(PYTHON) tools/test.py --mode=debug,release --valgrind
169172

170173
test-ci: | build-addons
171-
$(PYTHON) tools/test.py -p tap --logfile test.tap --mode=release --flaky-tests=$(FLAKY_TESTS) \
174+
$(PYTHON) tools/test.py $(PARALLEL_ARGS) -p tap --logfile test.tap \
175+
--mode=release --flaky-tests=$(FLAKY_TESTS) \
172176
$(TEST_CI_ARGS) addons message parallel sequential
173177

174178
test-release: test-build
@@ -596,8 +600,9 @@ jslint:
596600
tools/eslint-rules tools/jslint.js
597601

598602
jslint-ci:
599-
$(NODE) tools/jslint.js -f tap -o test-eslint.tap benchmark lib src test \
600-
tools/doc tools/eslint-rules tools/jslint.js
603+
$(NODE) tools/jslint.js $(PARALLEL_ARGS) -f tap -o test-eslint.tap \
604+
benchmark lib src test tools/doc \
605+
tools/eslint-rules tools/jslint.js
601606

602607
CPPLINT_EXCLUDE ?=
603608
CPPLINT_EXCLUDE += src/node_lttng.cc

0 commit comments

Comments
 (0)