forked from USCC-LAB/Weekly
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (35 loc) · 731 Bytes
/
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
# Python
PYTHON = python3
# Repo
SCRIPTS = scripts
TEST = tests
# Src
SRCS = $(shell find -name "*.py")
# System info
NPROC = $(shell getconf _NPROCESSORS_ONLN)
# Control verbosity
ifeq ("$(V)", "1")
Q :=
else
Q := @
endif
# Rule
all:
$(Q)true
%_test:
$(Q)$(PYTHON) -m unittest -v $(TEST).$@
check:
$(Q)$(PYTHON) -m unittest -v \
$(TEST).serializer_test \
$(TEST).scheduler_test \
$(TEST).roulette_test
# $(TEST).reader_test \
# $(TEST).mail_test \
# autopep8 refers to https://github.com/hhatto/autopep8
# pep8 refers to manual page
pep8diff:
$(Q)autopep8 --diff $(SRCS) | colordiff
pep8stat:
$(Q)pep8 --statistic -qq $(SRCS)
pep8replace:
$(Q)autopep8 -j$(NPROC) --in-place --aggressive -a $(SRCS)