forked from stratis-storage/stratis-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
77 lines (62 loc) · 2.69 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
UNITTEST_OPTS = --verbose
.PHONY: lint
lint:
./check.py check.py
./check.py setup.py
./check.py developer_tools
./check.py bin/stratis
./check.py src/stratis_cli
./check.py tests/whitebox
.PHONY: fmt
fmt:
isort --recursive check.py setup.py bin/stratis developer_tools src tests
black ./bin/stratis ./developer_tools/update_introspection_data .
.PHONY: fmt-travis
fmt-travis:
isort --recursive --diff --check-only check.py setup.py bin/stratis src tests
black ./bin/stratis ./developer_tools/update_introspection_data . --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
pyreverse ${PYREVERSE_OPTS} --project="test-whitebox" tests/whitebox/_misc.py -a 1
mv classes_test-whitebox.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:
python3 -m unittest discover ${UNITTEST_OPTS} --top-level-directory ./tests/whitebox --start-directory ./tests/whitebox/integration
unittest-tests:
python3 -m unittest discover ${UNITTEST_OPTS} --start-directory ./tests/whitebox/unittest
.PHONY: coverage-no-html
coverage-no-html:
python3 -m coverage --version
python3 -m coverage run --timid --branch -m unittest discover --quiet --top-level-directory ./tests/whitebox --start-directory ./tests/whitebox/integration >& /dev/null
python3 -m coverage run --timid --branch -a -m unittest discover --quiet --start-directory ./tests/whitebox/unittest
python3 -m coverage run --timid --branch -a -m unittest --quiet tests.whitebox.monkey_patching.test_keyboard_interrupt.KeyboardInterruptTestCase
python3 -m coverage run --timid --branch -a -m unittest --quiet tests.whitebox.monkey_patching.test_stratisd_version.StratisdVersionTestCase
python3 -m coverage report -m --fail-under=100 --show-missing --include="./src/*"
.PHONY: coverage
coverage: coverage-no-html
python3 -m coverage html --include="./src/*"
keyboard-interrupt-test:
python3 -m unittest ${UNITTEST_OPTS} tests.whitebox.monkey_patching.test_keyboard_interrupt.KeyboardInterruptTestCase
stratisd-version-test:
python3 -m unittest ${UNITTEST_OPTS} tests.whitebox.monkey_patching.test_stratisd_version.StratisdVersionTestCase
test-travis: unittest-tests
.PHONY: yamllint
yamllint:
yamllint --strict .github/workflows/main.yml