duck-booking-tool/Makefile

21 lines
615 B
Makefile
Raw Normal View History

2015-10-20 07:53:17 +00:00
APPENDCOV = $(shell test -s test_rerun.txt && echo "-a")
2015-10-20 09:28:27 +00:00
MODULES = duckbook booking api accounts
2015-10-20 07:53:17 +00:00
test:
coverage run $(APPENDCOV) \
2015-10-20 09:28:27 +00:00
--source `echo $(MODULES) | sed 's/ /,/g'` \
2015-10-20 07:53:17 +00:00
manage.py test `cat test_rerun.txt`
coverage html
coverage report
2015-10-20 09:28:27 +00:00
@echo "Coverage data is available in HTML format under the htmlcov directory"
lint:
2015-10-20 14:16:27 +00:00
rm -rf pylint/* || true
2015-10-20 09:28:27 +00:00
pylint --rcfile=.pylintrc $(MODULES) || true
2015-10-20 14:16:27 +00:00
mkdir pylint || true
2015-10-20 09:28:27 +00:00
sh -c 'for file in pylint_*; do \
o="$${file#pylint_}"; \
mv "$$file" pylint/$$o; \
done'
@echo "lint data is available in TXT format under the pylint directory"