Skip to content
Browse files

Added rules to Makefile.buildbot for generating coverage reports

  • Loading branch information...
1 parent 63c97f6 commit 432251beddb4208f6b18c45ed9fc97e34f20fdd8 @pablohoffman pablohoffman committed
Showing with 18 additions and 0 deletions.
  1. +3 −0 .coveragerc
  2. +15 −0 Makefile.buildbot
View
3 .coveragerc
@@ -0,0 +1,3 @@
+[run]
+include = scrapy/*
+omit = scrapy/xlib*,scrapy/tests*
View
15 Makefile.buildbot
@@ -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}"

0 comments on commit 432251b

Please sign in to comment.
Something went wrong with that request. Please try again.