forked from stratis-storage/stratis-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
59 lines (46 loc) · 1.48 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
PYTEST_OPTS = --verbose
TOX=tox
.PHONY: lint
lint:
$(TOX) -c tox.ini -e lint
.PHONY: fmt
fmt:
black .
.PHONY: fmt-travis
fmt-travis:
black . --check
PYREVERSE_OPTS = --output=pdf
.PHONY: view
view:
-rm -Rf _pyreverse
mkdir _pyreverse
pyreverse ${PYREVERSE_OPTS} --project="stratis-cli" src/stratis_cli
mv classes_stratis-cli.pdf _pyreverse
rm packages_stratis-cli.pdf
pyreverse ${PYREVERSE_OPTS} --project="stratis-cli-errors" src/stratis_cli/_errors.py
mv classes_stratis-cli-errors.pdf _pyreverse
.PHONY: archive
archive:
git archive --output=./stratis_cli.tar.gz HEAD
.PHONY: upload-release
upload-release:
python setup.py register sdist upload
.PHONY: docs
api-docs:
sphinx-apidoc-3 -P -F -o api src/stratis_cli
sphinx-build-3 -b html api api/_build/html
dbus-tests:
py.test-3 ${PYTEST_OPTS} ./tests/whitebox/integration
unittest-tests:
py.test-3 ${PYTEST_OPTS} ./tests/whitebox/unittest
coverage:
python3 -m coverage --version
python3 -m coverage run --timid --branch -m pytest ./tests/whitebox/integration
python3 -m coverage run --timid --branch -a -m pytest ./tests/whitebox/unittest
python3 -m coverage run --timid --branch -a -m pytest ./tests/whitebox/monkey_patching/test_keyboard_interrupt.py
python3 -m coverage html --include="./src/*"
python3 -m coverage report -m --fail-under=95 --show-missing --include="./src/*"
keyboard-interrupt-test:
py.test-3 ${PYTEST_OPTS} ./tests/whitebox/monkey_patching/test_keyboard_interrupt.py
test-travis:
$(TOX) -c tox.ini -e test