-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (33 loc) · 858 Bytes
/
Makefile
File metadata and controls
41 lines (33 loc) · 858 Bytes
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
default:
echo no op
.PHONY: test
test:
python3 -m unittest discover -v
.PHONY: test_sim
test_sim: check_simulate_pid
python3 -m unittest discover -v
tests/%: tests/%.py
PYTHONPATH=. python3 $< -v
.PHONY: sim simulate
simulate.pid sim simulate: check_simulate_pid
[ -f simulate.pid ] || { /usr/sbin/LCDd -f -c sim/20x2.conf & echo $$! > simulate.pid; }
sleep 1
$(MAKE) check_simulate_pid
[ -f simulate.pid ]
.PHONY: check_simulate_pid
check_simulate_pid:
if [ -f simulate.pid ] && \
! kill -0 `cat simulate.pid` 2>/dev/null; then \
echo "removing stale pidfile..." ;\
rm -f simulate.pid ;\
fi
.PHONY: kill_sim kill_simulate
kill_sim kill_simulation:
if [ -f simulate.pid ]; then \
kill `cat simulate.pid` ;\
rm simulate.pid ;\
fi
.PHONY: clean
clean:
rm -f *.pyc *~ tests/*.pyc tests/*~
rm -rf __pycache__ tests/__pycache__