forked from INTI-CMNB/KiBoM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
72 lines (57 loc) · 2.4 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
#!/usr/bin/make
PY_COV=python3-coverage
BROWSER=x-www-browser
PYTEST=pytest-3
OUT_DIR=output
SINGLE_TEST?=test_bom_ok
XMLS=tests/input_samples/
deb:
fakeroot dpkg-buildpackage -uc -b
deb_clean:
fakeroot debian/rules clean
lint:
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --statistics
test_local: lint
# No PyTest for Python 2 on bulleyes
# rm -rf $(OUT_DIR)2
# rm -f tests/input_samples/bom.ini
# pytest --test_dir $(OUT_DIR)2
rm -rf $(OUT_DIR)
rm -f tests/input_samples/bom.ini
$(PY_COV) erase
pytest-3 --test_dir $(OUT_DIR)
$(PY_COV) report
$(PY_COV) html
$(BROWSER) htmlcov/index.html
rm -f tests/input_samples/bom.ini
single_test:
rm -rf pp
-$(PYTEST) --log-cli-level debug -k "$(SINGLE_TEST)" --test_dir pp
@echo "********************" Output
@cat pp/*/output.txt
@echo "********************" Error
@cat pp/*/error.txt
@rm -f tests/input_samples/bom.ini
doc/Fork_PRs/examples/ds_link.html: doc/Fork_PRs/examples/ds_link.ini
./KiBOM_CLI.py --cfg $< -d `pwd`/$(@D) $(XMLS)links.xml $(@F)
doc/Fork_PRs/examples/ds_no_link.html: doc/Fork_PRs/examples/ds_no_link.ini
./KiBOM_CLI.py --cfg $< -d `pwd`/$(@D) $(XMLS)links.xml $(@F)
doc/Fork_PRs/examples/dk_link.html: doc/Fork_PRs/examples/dk_link.ini
./KiBOM_CLI.py --cfg $< -d `pwd`/$(@D) $(XMLS)links.xml $(@F)
doc/Fork_PRs/examples/dk_no_link.html: doc/Fork_PRs/examples/dk_no_link.ini
./KiBOM_CLI.py --cfg $< -d `pwd`/$(@D) $(XMLS)links.xml $(@F)
doc/Fork_PRs/examples/no_join.html: doc/Fork_PRs/examples/no_join.ini
./KiBOM_CLI.py --cfg $< -d `pwd`/$(@D) $(XMLS)join.xml $(@F)
doc/Fork_PRs/examples/join.html: doc/Fork_PRs/examples/join.ini
./KiBOM_CLI.py --cfg $< -d `pwd`/$(@D) $(XMLS)join.xml $(@F)
doc/Fork_PRs/examples/col_rename.html: doc/Fork_PRs/examples/col_rename.ini
./KiBOM_CLI.py --cfg $< -d `pwd`/$(@D) $(XMLS)links.xml $(@F)
doc/Fork_PRs/examples/col_no_rename.html: doc/Fork_PRs/examples/col_no_rename.ini
./KiBOM_CLI.py --cfg $< -d `pwd`/$(@D) $(XMLS)links.xml $(@F)
examples: doc/Fork_PRs/examples/ds_link.html doc/Fork_PRs/examples/ds_no_link.html \
doc/Fork_PRs/examples/dk_link.html doc/Fork_PRs/examples/dk_no_link.html \
doc/Fork_PRs/examples/no_join.html doc/Fork_PRs/examples/join.html \
doc/Fork_PRs/examples/col_rename.html doc/Fork_PRs/examples/col_no_rename.html
.PHONY: deb deb_clean single_test test_local lint examples