@@ -18,6 +18,8 @@ PWD = $(CURDIR)
1818
1919ifdef JOBS
2020 PARALLEL_ARGS = -j $(JOBS )
21+ else
22+ PARALLEL_ARGS = -J
2123endif
2224
2325ifdef ENABLE_V8_TAP
232234
233235.PHONY : jstest
234236jstest : build-addons build-addons-napi # # Runs addon tests and JS tests
235- $(PYTHON ) tools/test.py --mode=release -J \
237+ $(PYTHON ) tools/test.py $( PARALLEL_ARGS ) --mode=release \
236238 $(CI_JS_SUITES ) \
237239 $(CI_NATIVE_SUITES )
238240
@@ -267,13 +269,13 @@ test-cov: all
267269 $(MAKE ) lint
268270
269271test-parallel : all
270- $(PYTHON ) tools/test.py --mode=release parallel -J
272+ $(PYTHON ) tools/test.py $( PARALLEL_ARGS ) --mode=release parallel
271273
272274test-valgrind : all
273- $(PYTHON ) tools/test.py --mode=release --valgrind sequential parallel message
275+ $(PYTHON ) tools/test.py $( PARALLEL_ARGS ) --mode=release --valgrind sequential parallel message
274276
275277test-check-deopts : all
276- $(PYTHON ) tools/test.py --mode=release --check-deopts parallel sequential -J
278+ $(PYTHON ) tools/test.py $( PARALLEL_ARGS ) --mode=release --check-deopts parallel sequential
277279
278280benchmark/misc/function_call/build/Release/binding.node : all \
279281 benchmark/misc/function_call/binding.cc \
@@ -396,7 +398,7 @@ clear-stalled:
396398
397399.PHONY : test-gc
398400test-gc : all test/gc/build/Release/binding.node
399- $(PYTHON ) tools/test.py --mode=release gc
401+ $(PYTHON ) tools/test.py $( PARALLEL_ARGS ) --mode=release gc
400402
401403.PHONY : test-gc-clean
402404test-gc-clean :
@@ -408,10 +410,10 @@ test-build-addons-napi: all build-addons-napi
408410
409411.PHONY : test-all
410412test-all : test-build test/gc/build/Release/binding.node # # Run everything in test/.
411- $(PYTHON ) tools/test.py --mode=debug,release
413+ $(PYTHON ) tools/test.py $( PARALLEL_ARGS ) --mode=debug,release
412414
413415test-all-valgrind : test-build
414- $(PYTHON ) tools/test.py --mode=debug,release --valgrind
416+ $(PYTHON ) tools/test.py $( PARALLEL_ARGS ) --mode=debug,release --valgrind
415417
416418CI_NATIVE_SUITES ?= addons addons-napi
417419CI_JS_SUITES ?= default
@@ -473,29 +475,29 @@ run-ci: build-ci
473475 $(MAKE ) test-ci
474476
475477test-release : test-build
476- $(PYTHON ) tools/test.py --mode=release
478+ $(PYTHON ) tools/test.py $( PARALLEL_ARGS ) --mode=release
477479
478480test-debug : test-build
479- $(PYTHON ) tools/test.py --mode=debug
481+ $(PYTHON ) tools/test.py $( PARALLEL_ARGS ) --mode=debug
480482
481483test-message : test-build
482- $(PYTHON ) tools/test.py message
484+ $(PYTHON ) tools/test.py $( PARALLEL_ARGS ) message
483485
484486test-simple : | cctest # Depends on 'all'.
485- $(PYTHON ) tools/test.py parallel sequential
487+ $(PYTHON ) tools/test.py $( PARALLEL_ARGS ) parallel sequential
486488
487489test-pummel : all
488- $(PYTHON ) tools/test.py pummel
490+ $(PYTHON ) tools/test.py $( PARALLEL_ARGS ) pummel
489491
490492test-internet : all
491- $(PYTHON ) tools/test.py internet
493+ $(PYTHON ) tools/test.py $( PARALLEL_ARGS ) internet
492494
493495test-node-inspect : $(NODE_EXE )
494496 USE_EMBEDDED_NODE_INSPECT=1 $(NODE ) tools/test-npm-package \
495497 --install deps/node-inspect test
496498
497499test-tick-processor : all
498- $(PYTHON ) tools/test.py tick-processor
500+ $(PYTHON ) tools/test.py $( PARALLEL_ARGS ) tick-processor
499501
500502.PHONY : test-hash-seed
501503# Verifies the hash seed used by V8 for hashing is random.
@@ -505,10 +507,10 @@ test-hash-seed: all
505507.PHONY : test-doc
506508test-doc : doc-only # # Builds, lints, and verifies the docs.
507509 $(MAKE ) lint
508- $(PYTHON ) tools/test.py $(CI_DOC )
510+ $(PYTHON ) tools/test.py $(PARALLEL_ARGS ) $( CI_DOC )
509511
510512test-known-issues : all
511- $(PYTHON ) tools/test.py known_issues
513+ $(PYTHON ) tools/test.py $( PARALLEL_ARGS ) known_issues
512514
513515# Related CI job: node-test-npm
514516test-npm : $(NODE_EXE ) # # Run the npm test suite on deps/npm.
@@ -519,7 +521,7 @@ test-npm-publish: $(NODE_EXE)
519521
520522.PHONY : test-addons-napi
521523test-addons-napi : test-build-addons-napi
522- $(PYTHON ) tools/test.py --mode=release addons-napi
524+ $(PYTHON ) tools/test.py $( PARALLEL_ARGS ) --mode=release addons-napi
523525
524526.PHONY : test-addons-napi-clean
525527test-addons-napi-clean :
@@ -528,7 +530,7 @@ test-addons-napi-clean:
528530
529531.PHONY : test-addons
530532test-addons : test-build test-addons-napi
531- $(PYTHON ) tools/test.py --mode=release addons
533+ $(PYTHON ) tools/test.py $( PARALLEL_ARGS ) --mode=release addons
532534
533535.PHONY : test-addons-clean
534536test-addons-clean :
@@ -539,19 +541,19 @@ test-addons-clean:
539541
540542test-timers :
541543 $(MAKE ) --directory=tools faketime
542- $(PYTHON ) tools/test.py --mode=release timers
544+ $(PYTHON ) tools/test.py $( PARALLEL_ARGS ) --mode=release timers
543545
544546test-timers-clean :
545547 $(MAKE ) --directory=tools clean
546548
547549test-async-hooks :
548- $(PYTHON ) tools/test.py --mode=release async-hooks
550+ $(PYTHON ) tools/test.py $( PARALLEL_ARGS ) --mode=release async-hooks
549551
550552test-with-async-hooks :
551553 $(MAKE ) build-addons
552554 $(MAKE ) build-addons-napi
553555 $(MAKE ) cctest
554- NODE_TEST_WITH_ASYNC_HOOKS=1 $(PYTHON ) tools/test.py --mode=release -J \
556+ NODE_TEST_WITH_ASYNC_HOOKS=1 $(PYTHON ) tools/test.py $( PARALLEL_ARGS ) --mode=release \
555557 $(CI_JS_SUITES ) \
556558 $(CI_NATIVE_SUITES )
557559
0 commit comments