Skip to content

Commit

Permalink
build: allow test-ci to run tests in parallel
Browse files Browse the repository at this point in the history
Run tests in parallel if the environment variable JOBS
(which should contain a number of parallel jobs) is set.

PR-URL: nodejs#6208
Reviewed-By: Rod Vagg <rod@vagg.org>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
  • Loading branch information
jbergstroem authored and joelostrowski committed Apr 25, 2016
1 parent c1c1c97 commit 6cf7074
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,12 @@ PREFIX ?= /usr/local
FLAKY_TESTS ?= run
TEST_CI_ARGS ?=
STAGINGSERVER ?= node-www

OSTYPE := $(shell uname -s | tr '[A-Z]' '[a-z]')

ifdef JOBS
PARALLEL_ARGS = -j $(JOBS)
endif

ifdef QUICKCHECK
QUICKCHECK_ARG := --quickcheck
endif
Expand Down Expand Up @@ -168,7 +171,8 @@ test-all-valgrind: test-build
$(PYTHON) tools/test.py --mode=debug,release --valgrind

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

test-release: test-build
Expand Down Expand Up @@ -607,8 +611,9 @@ jslint:
tools/eslint-rules tools/jslint.js

jslint-ci:
$(NODE) tools/jslint.js -f tap -o test-eslint.tap benchmark lib src test \
tools/doc tools/eslint-rules tools/jslint.js
$(NODE) tools/jslint.js $(PARALLEL_ARGS) -f tap -o test-eslint.tap \
benchmark lib src test tools/doc \
tools/eslint-rules tools/jslint.js

CPPLINT_EXCLUDE ?=
CPPLINT_EXCLUDE += src/node_lttng.cc
Expand Down

0 comments on commit 6cf7074

Please sign in to comment.