]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Update coverage-related targets in Makefile. refs #1698
authorDaira Hopwood <daira@jacaranda.org>
Mon, 8 Sep 2014 21:49:23 +0000 (22:49 +0100)
committerDaira Hopwood <daira@jacaranda.org>
Mon, 8 Sep 2014 21:49:23 +0000 (22:49 +0100)
Signed-off-by: Daira Hopwood <daira@jacaranda.org>
Makefile
misc/coding_tools/coverage2el.py

index cbb72d0fffac549b073bf142f5118f776bd398ee..24c7c602c528f48c2dc37f894dd76b63d345e385 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -51,10 +51,6 @@ test:
 
 check: test
 
-test-coverage: build
-       rm -f .coverage
-       $(TAHOE) debug trial --reporter=bwverbose-coverage $(TEST)
-
 quicktest: make-version
        $(TAHOE) debug trial $(TRIALARGS) $(TEST)
 
@@ -70,19 +66,24 @@ _tmpfstest: make-version
        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)
index f2b7ee4baf7cd718a7f15dcd194c9f63b14f7c64..a3d8d545617b6f6283a4a82414d4ff7bab513a70 100644 (file)
@@ -18,7 +18,7 @@ class ElispReporter(summary.SummaryReporter):
 
         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