Skip to content

Commit a3c42a1

Browse files
committed
Let MUTANT_JOBS influence --jobs argument in mutant
* there's no native `MUTANT_JOBS` env var in mutant yet * jobs setting is very environment-specific * maximum number of processors is not always optimal, i.e. on M4 Pro with 12 total cores it is better to only use the 6 performance cores for shorter total time
1 parent 59d3fe8 commit a3c42a1

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

support/make/mutant.mk

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
mutate: ## Run mutation tests
22
@echo "Running mutation tests"
3-
@bundle exec mutant run $(SUBJECT)
3+
@bundle exec mutant run \
4+
$(if $(MUTANT_JOBS), --jobs $(MUTANT_JOBS)) \
5+
$(SUBJECT)
46

57
mutate-fast: ## Run mutation tests with --fail-fast
68
@echo "Running mutation tests"
7-
@bundle exec mutant run --fail-fast $(SUBJECT)
9+
@bundle exec mutant run \
10+
$(if $(MUTANT_JOBS), --jobs $(MUTANT_JOBS)) \
11+
--fail-fast \
12+
$(SUBJECT)
813

914
mutate-changes: ## Run incremental mutation tests
1015
@echo "Running mutation tests"
11-
@bundle exec mutant run --since master $(SUBJECT)
16+
@bundle exec mutant run \
17+
$(if $(MUTANT_JOBS), --jobs $(MUTANT_JOBS)) \
18+
--since master \
19+
$(SUBJECT)

0 commit comments

Comments
 (0)