forked from bmw-software-engineering/lobster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
126 lines (103 loc) · 3.33 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
SYSTEM_PYTHONPATH:=$(PYTHONPATH)
export LOBSTER_ROOT=$(PWD)
export PYTHONPATH=$(LOBSTER_ROOT)
ASSETS=$(wildcard assets/*.svg)
lobster/html/assets.py: $(ASSETS) util/mkassets.py
util/mkassets.py lobster/html/assets.py $(ASSETS)
lint: style
@PYTHONPATH=$(SYSTEM_PYTHONPATH) \
python3 -m pylint --rcfile=pylint3.cfg \
--reports=no \
--ignore=assets.py \
lobster
style:
@python3 -m pycodestyle lobster \
--exclude=assets.py
.PHONY: packages
packages:
git clean -xdf
make lobster/html/assets.py
make -C packages/lobster-core
make -C packages/lobster-tool-trlc
make -C packages/lobster-tool-codebeamer
make -C packages/lobster-tool-cpp
make -C packages/lobster-tool-cpptest
make -C packages/lobster-tool-gtest
make -C packages/lobster-tool-json
make -C packages/lobster-tool-python
make -C packages/lobster-metapackage
make -C packages/lobster-monolithic
PYTHONPATH= \
pip3 install --prefix test_install \
packages/*/dist/*.whl
PYTHONPATH= \
pip3 install --prefix test_install_monolithic \
packages/lobster-monolithic/meta_dist/*.whl
diff -Naur test_install/lib/python*/site-packages/lobster test_install_monolithic/lib/python*/site-packages/lobster -x "*.pyc"
diff -Naur test_install/bin test_install_monolithic/bin
integration-tests: packages
(cd integration-tests/projects/basic; make)
(cd integration-tests/projects/filter; make)
system-tests:
mkdir -p docs
make -B -C test-system/lobster-json
make -B -C test-system/lobster-python
unit-tests:
coverage run -p \
--branch --rcfile=coverage.cfg \
--data-file .coverage \
-m unittest discover -s test-unit -v
test: integration-tests system-tests unit-tests
upload-main: packages
python3 -m twine upload --repository pypi packages/*/dist/*
python3 -m twine upload --repository pypi packages/*/meta_dist/*
remove-dev:
python3 -m util.release
github-release:
git push
python3 -m util.github_release
bump:
python3 -m util.bump_version_post_release
full-release:
make remove-dev
git push
make github-release
make bump
git push
coverage:
coverage combine -q
coverage html --rcfile=coverage.cfg
coverage report --rcfile=coverage.cfg --fail-under=57
test-ci: system-tests unit-tests coverage
util/check_local_modifications.sh
docs:
rm -rf docs
mkdir docs
@-make tracing
tracing: report.lobster
mkdir -p docs
make lobster/html/assets.py
lobster-html-report report.lobster --out=docs/tracing.html
lobster-ci-report report.lobster
report.lobster: lobster/tools/lobster.conf \
code.lobster \
unit-tests.lobster \
requirements.lobster \
system-tests.lobster
lobster-report \
--lobster-config=lobster/tools/lobster.conf \
--out=report.lobster
lobster-online-report report.lobster
requirements.lobster: lobster/tools/trlc/requirements.trlc \
lobster/tools/requirements.rsl
lobster-trlc lobster/tools/trlc lobster/tools/requirements.rsl \
--config-file=lobster/tools/lobster-trlc.conf \
--out requirements.lobster
code.lobster: $(wildcard lobster/tools/trlc/*.py)
lobster-python --out code.lobster lobster/tools/trlc
unit-tests.lobster: $(wildcard test-unit/lobster-trlc/*.py)
lobster-python --activity --out unit-tests.lobster test-unit/lobster-trlc
system-tests.lobster: $(wildcard test-system/*/*.rsl) \
$(wildcard test-system/*/*.trlc) \
$(wildcard test-system/*/tracing)
python3 test-system/lobster-trlc/lobster-trlc-system-test.py