check: test
-test-coverage: build
- rm -f .coverage
- $(TAHOE) debug trial --reporter=bwverbose-coverage $(TEST)
-
quicktest: make-version
$(TAHOE) debug trial $(TRIALARGS) $(TEST)
sudo umount '$(TMPDIR)'
rmdir '$(TMPDIR)'
-# code-coverage: install the "coverage" package from PyPI, do "make
-# quicktest-coverage" to do a unit test run with coverage-gathering enabled,
-# then use "make coverate-output-text" for a brief report, or "make
-# coverage-output" for a pretty HTML report. Also see "make .coverage.el" and
-# misc/coding_tools/coverage.el for emacs integration.
-quicktest-coverage: make-version
- rm -f .coverage
- PYTHONPATH=. $(TAHOE) debug trial --reporter=bwverbose-coverage $(TEST)
-# on my laptop, "quicktest" takes 239s, "quicktest-coverage" takes 304s
+# code coverage: install the "coverage" package from PyPI, do "make test-coverage" to
+# do a unit test run with coverage-gathering enabled, then use "make coverage-output" to
+# generate an HTML report. Also see "make .coverage.el" and misc/coding_tools/coverage.el
+# for Emacs integration.
+
+# This might need to be python-coverage on Debian-based distros.
+COVERAGE=coverage
+
+COVERAGEARGS=--branch --source=src/allmydata
# --include appeared in coverage-3.4
COVERAGE_OMIT=--include '$(CURDIR)/src/allmydata/*' --omit '$(CURDIR)/src/allmydata/test/*'
+
+test-coverage: build
+ rm -f .coverage
+ $(TAHOE) '@$(COVERAGE)' run $(COVERAGEARGS) @tahoe debug trial $(TRIALARGS) $(TEST)
+
coverage-output:
rm -rf coverage-html
coverage html -i -d coverage-html $(COVERAGE_OMIT)
out = open(".coverage.el", "w")
out.write("""
-;; This is an elisp-readable form of the figleaf coverage data. It defines a
+;; This is an elisp-readable form of the coverage data. It defines a
;; single top-level hash table in which the key is an asolute pathname, and
;; the value is a three-element list. The first element of this list is a
;; list of line numbers that represent actual code statements. The second is