Add support for multiprocessing for the tests.
This commit is contained in:
parent
2a04455955
commit
7c64be3f51
12
Makefile
12
Makefile
@ -4,6 +4,12 @@ SHELL := bash
|
||||
.DELETE_ON_ERROR:
|
||||
MAKEFLAGS += --warn-undefined-variables
|
||||
MAKEFLAGS += --no-builtin-rules
|
||||
TESTJOBS := 4
|
||||
OS:=$(shell uname -s)
|
||||
|
||||
ifeq ($(OS),Linux)
|
||||
TESTJOBS:=$(shell nproc)
|
||||
endif
|
||||
|
||||
ifeq ($(origin .RECIPEPREFIX), undefined)
|
||||
$(error This Make does not support .RECIPEPREFIX. Please use GNU Make 4.0 or later)
|
||||
@ -24,15 +30,15 @@ clean:
|
||||
|
||||
.PHONY: test
|
||||
test:
|
||||
> cargo test --lib --test test_loader
|
||||
> cargo test --lib --test test_loader -- --test-threads $(TESTJOBS)
|
||||
|
||||
.PHONY: integrationtest
|
||||
integrationtest:
|
||||
> cargo test --no-fail-fast --test test_loader
|
||||
> cargo test --no-fail-fast --test test_loader -- --test-threads $(TESTJOBS)
|
||||
|
||||
.PHONY: unittest
|
||||
unittest:
|
||||
> cargo test --lib
|
||||
> cargo test --lib -- --test-threads $(TESTJOBS)
|
||||
|
||||
.PHONY: run
|
||||
run:
|
||||
|
Loading…
Reference in New Issue
Block a user