-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
66 lines (54 loc) · 2.36 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
.PHONY: check_pylint check_pyflakes tests check
SHELL:=/bin/bash
PYTHON_SOURCES = pyzwaver/*.py tests/*.py *.py
TD = ./TestData
export PYTHONPATH = $(PWD)
check_pylint::
@echo "============================================================"
@echo "pylint checking"
@echo "============================================================"
@for i in $(PYTHON_SOURCES) ; do echo pylint3: $$i ; pylint3 --rcfile pylint.conf -E $$i ; done
check_pyflakes::
@echo "============================================================"
@echo "pyflake checking"
@echo "============================================================"
@for i in $(PYTHON_SOURCES) ; do echo pyflakes: $$i ; pyflakes3 $$i ; done
check_html:
tidy -quiet -errors Static/index.html
check_js:
echo
check:: check_pylint check_pyflakes check_html check_js
# generate zwave.py file with all zwave constants
pyzwaver/zwave.py: constants_generator.py
./constants_generator.py python > $@
autopep8 -a -a -a -i *.py $@
format:
autopep8 -a -a -a -i *.py pyzwaver/*py
tests:
@echo "============================================================"
@echo "run message parsing test"
@echo "============================================================"
./Tests/command_test.py < TestData/commands.input.txt
./Tests/command_test.py same_value < TestData/commands.input.same_value.txt
@echo "============================================================"
@echo "application node test"
@echo "============================================================"
./Tests/application_nodeset_test.py
@echo "============================================================"
@echo "Replay Test 09"
@echo "============================================================"
./Tests/replay_test.py < TestData/node.09.input.txt > node.09.output.txt
diff TestData/node.09.golden.txt node.09.output.txt
rm node.09.output.txt
@echo "============================================================"
@echo "Replay Test 10"
@echo "============================================================"
./Tests/replay_test.py < TestData/node.10.input.txt > node.10.output.txt
diff TestData/node.10.golden.txt node.10.output.txt
rm node.10.output.txt
@echo "PASS"
test_security:
@echo "============================================================"
@echo "run message parsing test"
@echo "============================================================"
./Tests/security_test.py