-
Notifications
You must be signed in to change notification settings - Fork 52
/
Makefile
43 lines (29 loc) · 1.13 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
JS_FILES?=`find ./js_tests/tests -type f -name '*.js'`
DJANGO_SETTINGS_MODULE?=tests.settings_contrib
test: test-py test-js
test-py:
DJANGO_SETTINGS_MODULE=$(DJANGO_SETTINGS_MODULE) py.test $(PYTEST_OPTIONS)
coverage:
+make test-py PYTEST_OPTIONS='--cov widgy'
coverage html --omit='widgy/*migrations/*,widgy/contrib/*/*migrations/*,'
browser: coverage
sensible-browser ./htmlcov/index.html
js_tests/node_modules: js_tests/package.json
cd js_tests && npm install .
test-js: js_tests/node_modules
node -v
./js_tests/node_modules/mocha/bin/mocha \
-s 5 \
--reporter spec \
$(JS_FILES)
widgy/locale/en/LC_MESSAGES/django.po: $(shell find . -type f -iregex '.*\.\(html\|py\|md\)$$' | grep -v .tox)
cd widgy && django-admin.py makemessages -l en
widgy/locale/xx_pseudo/LC_MESSAGES/django.po: widgy/locale/en/LC_MESSAGES/django.po
-rm -r "`dirname $@`"
potpie $< $@
widgy/locale/xx_pseudo/LC_MESSAGES/django.mo: widgy/locale/xx_pseudo/LC_MESSAGES/django.po
cd widgy && django-admin.py compilemessages
t10n: widgy/locale/xx_pseudo/LC_MESSAGES/django.mo
docs:
cd docs && $(MAKE) html
.PHONY: test coverage browser test-py test-js docs