-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
81 lines (65 loc) · 2.09 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
69
70
71
72
73
74
75
76
77
78
79
80
81
PACKAGE=stoq
SCHEMADIR=/mondo/htdocs/stoq.com.br/devel/schema/
JS_AD="http://pagead2.googlesyndication.com/pagead/show_ads.js"
API_DOC_DIR=dragon2:/var/www/stoq.com.br/doc/api/stoq/$(VERSION)/
MANUAL_DOC_DIR=dragon2:/var/www/stoq.com.br/doc/manual/$(VERSION)/
TEST_MODULES=stoq stoqlib plugins tests
# http://stackoverflow.com/questions/2214575/passing-arguments-to-make-run
# List of command that takes test_modules arguments via make
TEST_MODULES_CMD=check check-failed
ifneq (,$(findstring $(firstword $(MAKECMDGOALS)),$(TEST_MODULES_CMD)))
_TEST_ARGS=$(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
$(eval $(_TEST_ARGS):;@:)
ifneq (,$(_TEST_ARGS))
TEST_MODULES=$(_TEST_ARGS)
endif
else
endif
apidocs:
make -C docs/api html
manual:
mkdir -p docs/manual/pt_BR/_build/html
yelp-build html -o docs/manual/pt_BR/_build/html docs/manual/pt_BR
upload-apidocs:
cd docs/api/_build/html && rsync -avz --del . $(API_DOC_DIR)
upload-manual:
cd docs/manual/pt_BR/_build/html && rsync -avz --del . $(MANUAL_DOC_DIR)
schemadocs:
schemaspy -t pgsql -host anthem -db $(USER) -u $(USER) -s public -o $(SCHEMADIR) \
-X '(.*\.te_created_id)|(.*\.te_modified_id)' -norows
sed -i "s|$(JS_AD)||" $(SCHEMADIR)/*html
sed -i "s|$(JS_AD)||" $(SCHEMADIR)/tables/*html
check-source:
tools/source-tests.sh --modified
check-source-all:
tools/source-tests.sh
pylint:
pylint --load-plugins tools/pylint_stoq -E \
stoqlib/domain/*.py \
stoqlib/domain/payment/*.py
check: check-source
@echo "Running $(TEST_MODULES) unittests"
@rm -f .noseids
@python runtests.py --failed $(TEST_MODULES)
check-failed:
python runtests.py --failed $(TEST_MODULES)
coverage:
python runtests.py \
--with-xcoverage \
--with-xunit \
--cover-package=stoq,stoqlib \
--cover-erase \
--cover-inclusive \
$(TEST_MODULES)
tools/validatecoverage
jenkins: check-source-all
python runtests.py \
--with-xunit \
$(TEST_MODULES)
external:
@cat requirements.txt | \
grep -v -e '^#' | \
PYTHONPATH=external/ xargs -n 1 \
easy_install -x -d external
include async.mk
.PHONY: external TAGS