source:
rtems-central/Makefile
@
d3edaca
Last change on this file since d3edaca was e49c759, checked in by Sebastian Huber <sebastian.huber@…>, on 07/15/20 at 08:04:25 | |
---|---|
|
|
File size: 683 bytes |
Rev | Line | |
---|---|---|
[e49c759] | 1 | PY_SRC_FILES = $(wildcard *.py) $(wildcard rtemsspec/*.py) |
2 | PY_ALL_FILES = $(PY_SRC_FILES) $(wildcard rtemsspec/tests/*.py) | |
[2ac9fc8] | 3 | |
[8164bd4] | 4 | all: check format analyse coverage-report |
5 | ||
6 | check: check-env | |
[e49c759] | 7 | coverage run --branch -m pytest -vv rtemsspec/tests |
[8164bd4] | 8 | |
9 | format: $(PY_ALL_FILES) | check-env | |
[75c689f] | 10 | yapf -i --parallel $^ |
[8164bd4] | 11 | |
12 | analyse: $(PY_SRC_FILES) | check-env | |
[c0ac12a] | 13 | flake8 $^ |
14 | mypy $^ | |
15 | pylint $^ | |
16 | ||
17 | check-env: | |
18 | test -n "$$VIRTUAL_ENV" | |
19 | ||
[2ac9fc8] | 20 | EMPTY := |
21 | SPACE := $(EMPTY) $(EMPTY) | |
22 | COMMA := , | |
23 | ||
[c0ac12a] | 24 | coverage-report: |
[b6041e6] | 25 | coverage report -m --fail-under=100 --include=$(subst $(SPACE),$(COMMA),$(PY_SRC_FILES)) |
[c0ac12a] | 26 | |
[d4eb5be] | 27 | .PHONY: env |
[c0ac12a] | 28 | |
29 | env: | |
30 | python3 -m venv env | |
[d854464] | 31 | . env/bin/activate && pip install --upgrade pip && pip install -r requirements.txt |
Note: See TracBrowser
for help on using the repository browser.