Skip to content

Commit a4cba2d

Browse files
chrismillerukjasnell
authored andcommitted
build: normalise test.py calls to use PARALLEL_ARGS
PR-URL: #20124 Fixes: #20065 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
1 parent 49275c4 commit a4cba2d

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

Makefile

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ PWD = $(CURDIR)
1818

1919
ifdef JOBS
2020
PARALLEL_ARGS = -j $(JOBS)
21+
else
22+
PARALLEL_ARGS = -J
2123
endif
2224

2325
ifdef ENABLE_V8_TAP
@@ -232,7 +234,7 @@ v8:
232234

233235
.PHONY: jstest
234236
jstest: 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

269271
test-parallel: all
270-
$(PYTHON) tools/test.py --mode=release parallel -J
272+
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=release parallel
271273

272274
test-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

275277
test-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

278280
benchmark/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
398400
test-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
402404
test-gc-clean:
@@ -408,10 +410,10 @@ test-build-addons-napi: all build-addons-napi
408410

409411
.PHONY: test-all
410412
test-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

413415
test-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

416418
CI_NATIVE_SUITES ?= addons addons-napi
417419
CI_JS_SUITES ?= default
@@ -473,29 +475,29 @@ run-ci: build-ci
473475
$(MAKE) test-ci
474476

475477
test-release: test-build
476-
$(PYTHON) tools/test.py --mode=release
478+
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=release
477479

478480
test-debug: test-build
479-
$(PYTHON) tools/test.py --mode=debug
481+
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=debug
480482

481483
test-message: test-build
482-
$(PYTHON) tools/test.py message
484+
$(PYTHON) tools/test.py $(PARALLEL_ARGS) message
483485

484486
test-simple: | cctest # Depends on 'all'.
485-
$(PYTHON) tools/test.py parallel sequential
487+
$(PYTHON) tools/test.py $(PARALLEL_ARGS) parallel sequential
486488

487489
test-pummel: all
488-
$(PYTHON) tools/test.py pummel
490+
$(PYTHON) tools/test.py $(PARALLEL_ARGS) pummel
489491

490492
test-internet: all
491-
$(PYTHON) tools/test.py internet
493+
$(PYTHON) tools/test.py $(PARALLEL_ARGS) internet
492494

493495
test-node-inspect: $(NODE_EXE)
494496
USE_EMBEDDED_NODE_INSPECT=1 $(NODE) tools/test-npm-package \
495497
--install deps/node-inspect test
496498

497499
test-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
506508
test-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

510512
test-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
514516
test-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
521523
test-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
525527
test-addons-napi-clean:
@@ -528,7 +530,7 @@ test-addons-napi-clean:
528530

529531
.PHONY: test-addons
530532
test-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
534536
test-addons-clean:
@@ -539,19 +541,19 @@ test-addons-clean:
539541

540542
test-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

544546
test-timers-clean:
545547
$(MAKE) --directory=tools clean
546548

547549
test-async-hooks:
548-
$(PYTHON) tools/test.py --mode=release async-hooks
550+
$(PYTHON) tools/test.py $(PARALLEL_ARGS) --mode=release async-hooks
549551

550552
test-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

Comments
 (0)