Added rules to Makefile.buildbot for generating coverage reports

This commit is contained in:
Pablo Hoffman 2010-12-15 11:13:45 -02:00
parent 63c97f65f4
commit 432251bedd
2 changed files with 18 additions and 0 deletions

3
.coveragerc Normal file
View File

@ -0,0 +1,3 @@
[run]
include = scrapy/*
omit = scrapy/xlib*,scrapy/tests*

View File

@ -1,6 +1,21 @@
TRIAL := $(shell which trial)
COVERAGE_DIR ?= "htmlcov"
deb:
python extras/makedeb.py build
deb-clean:
debclean
python extras/makedeb.py clean
# Generate coverage reports
# Requires: coverage 3.3 or above from http://pypi.python.org/pypi/coverage
coverage-report:
coverage run --branch ${TRIAL} --reporter=text scrapy.tests
coverage html -i -d "${COVERAGE_DIR}"
coverage-view: coverage-report
python -m webbrowser "${COVERAGE_DIR}"
coverage-clean:
rm -rf .coverage "${COVERAGE_DIR}"