-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathMakefile
68 lines (51 loc) · 1.82 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
DEBUG_MULTI=strace -tt -T -ff -o debug/runner -s 128
DEBUG_SIMPLE=strace -tt -T -o debug/runner -s 128
PYTHON=python3.6
RUNNER=$(PYTHON)
# no python3.6-coverage yet :(
# RUNNER=$(PYTHON)-coverage run
# can't use --buffer because:
# File "/home/mdione/src/projects/ayrton/ayrton/__init__.py", line 191, in polute
# self[std]= getattr (sys, std).buffer
# AttributeError: '_io.StringIO' object has no attribute 'buffer'
UNITTEST_OPTS=--verbose
all: docs
INSTALL_DIR=$(HOME)/local
tests:
LC_ALL=C $(RUNNER) -m unittest discover $(UNITTEST_OPTS) ayrton
slowtest: debug
# LC_ALL=C $(DEBUG_SIMPLE) $(RUNNER) -m unittest discover --failfast \
# $(UNITTEST_OPTS) ayrton
LC_ALL=C $(DEBUG_MULTI) $(RUNNER) -m unittest discover --failfast \
$(UNITTEST_OPTS) ayrton
quicktest:
LC_ALL=C $(RUNNER) -m unittest discover --failfast $(UNITTEST_OPTS) ayrton
docs:
RUNNERPATH=${PWD} make -C doc html
install: tests
$(PYTHON) setup.py install --prefix=$(INSTALL_DIR)
unsafe-install:
@echo "unsafe install, are you sure?"
@read foo
$(PYTHON) setup.py install --prefix=$(INSTALL_DIR)
upload: tests upload-docs
$(PYTHON) setup.py sdist upload
upload-docs: docs
rsync --archive --verbose --compress --rsh ssh doc/build/html/ www.grulic.org.ar:www/projects/ayrton/
push: tests
git push
check:
flake8 --ignore E201,E211,E225,E221,E226,E202 --show-source --statistics --max-line-length 130 ayrton/*.py
testclean:
rm -f ayrton.*log debug/runner* debug/remote* *.ayrtmp
debug:
mkdir -pv debug
rsa_server_key:
# generate a rsa server key
ssh-keygen -f rsa_server_key -N '' -t rsa; \
debugserver: rsa_server_key
# TODO: discover sshd's path?
# sshd re-exec requires execution with an absolute path
/usr/sbin/sshd -dd -e -h $(shell pwd)/rsa_server_key -p 2244
covreport:
$(PYTHON)-coverage report -m | grep ayrton | egrep -v '/(parser|tests)/'