forked from sifive/pydevicetree
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
67 lines (52 loc) · 1.5 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
# Copyright (c) 2019 SiFive Inc.
# SPDX-License-Identifier: Apache-2.0
all: test dist
venv/bin/activate:
python3 -m venv venv
. $@ && pip install --upgrade pip
. $@ && pip install -r requirements.txt
.PHONY: virtualenv
virtualenv: venv/bin/activate
.PHONY: dist
dist: venv/bin/activate
. $< && pip install --upgrade setuptools wheel
. $< && python3 setup.py sdist bdist_wheel
.PHONY: dist-clean
dist-clean: venv/bin/activate
. $< && python3 setup.py clean --all
-rm -rf dist pydevicetree.egg-info
clean: dist-clean
.PHONY: upload
upload: venv/bin/activate dist
. $< && pip install twine
. $< && python3 -m twine upload dist/*
.PHONY: test-types
test-types: venv/bin/activate
. $< && mypy -p pydevicetree
test: test-types
.PHONY: test-lint
test-lint: venv/bin/activate
. $< && pylint pydevicetree
test: test-lint
UNIT_TESTS = tests/test_devicetree.py \
tests/test_grammar.py \
tests/test_exceptions.py \
tests/test_overlay.py
.PHONY: test-unit
test-unit: venv/bin/activate $(UNIT_TESTS)
. $< && python3 -m unittest $(UNIT_TESTS)
test: test-unit
.PHONY: test-cache-size-bound
test-cache-size-bound: venv/bin/activate $(UNIT_TESTS)
PYDEVICETREE_CACHE_SIZE_BOUND=128 . $< && python3 -m unittest $(UNIT_TESTS)
test: test-cache-size-bound
INTEGRATION_TESTS = tests/test_full_trees.py
.PHONY: test-integration
test-integration: venv/bin/activate
. $< && python3 -m unittest $(INTEGRATION_TESTS)
test: test-integration
.PHONY: test
test:
.PHONY: clean
clean:
-rm -rf venv .mypy_cache __pycache__