-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
67 lines (47 loc) · 1.55 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
SHELL=/bin/bash
.PHONY: init
init:
python3 -m venv venv
.PHONY: deps
deps:
./venv/bin/pip install -e .[develop]
.PHONY: dist
dist:
./venv/bin/python setup.py egg_info sdist;
./venv/bin/pip wheel --no-index --no-deps --wheel-dir dist dist/*.tar.gz
ls dist
.PHONY: test
test:
./venv/bin/pytest
.PHONY: clean
clean: ptys-down
rm -f socat_*
rm -rf dist
find . | grep -E "(__pycache__|\.pyc|\.pyo$$)" | xargs rm -rf
ptys-up: pty-A pty-B pty-C pty-D pty-E pty-F pty-G
ps | grep socat
ptys-down:
pkill socat || true
ps | grep socat
pty-A:
socat -x -d -d PTY,raw,echo=1,link=/tmp/vmodem_A0 PTY,raw,echo=0,link=/tmp/vmodem_A1 &> build/socat_A.log &
pty-B:
socat -x -d -d PTY,raw,echo=1,link=/tmp/vmodem_B0 PTY,raw,echo=0,link=/tmp/vmodem_B1 &> build/socat_B.log &
pty-C:
socat -x -d -d PTY,raw,echo=1,link=/tmp/vmodem_C0 PTY,raw,echo=0,link=/tmp/vmodem_C1 &> build/socat_C.log &
pty-D:
socat -x -d -d PTY,raw,echo=1,link=/tmp/vmodem_D0 PTY,raw,echo=0,link=/tmp/vmodem_D1 &> build/socat_D.log &
pty-E:
socat -x -d -d PTY,raw,echo=1,link=/tmp/vmodem_E0 PTY,raw,echo=0,link=/tmp/vmodem_E1 &> build/socat_E.log &
pty-F:
socat -x -d -d PTY,raw,echo=1,link=/tmp/vmodem_F0 PTY,raw,echo=0,link=/tmp/vmodem_F1 &> build/socat_F.log &
pty-G:
socat -x -d -d PTY,raw,echo=1,link=/tmp/vmodem_G0 PTY,raw,echo=0,link=/tmp/vmodem_G1 &> build/socat_G.log &
node-1:
. venv/bin/activate; tarpn-node config/config-1.ini
node-2:
. venv/bin/activate; tarpn-node config/config-2.ini
node-3:
. venv/bin/activate; tarpn-node config/config-3.ini
nodes-down:
pkill tarpn-node