Add test coverage analysis (make coverage)
authorSimon McVittie <smcv@debian.org>
Fri, 4 Nov 2011 18:18:33 +0000 (18:18 +0000)
committerSimon McVittie <smcv@debian.org>
Wed, 9 Nov 2011 22:49:36 +0000 (22:49 +0000)
.gitignore
Makefile.PL

index 6b7efe5c150a177fcd9c4bc5e5c297e48771078e..fe1c3d441cc362d12390c70d8e3c9266f1ac5021 100644 (file)
@@ -2,6 +2,7 @@ ikiwiki.setup
 Makefile
 Makefile.old
 blib/*
+/cover_db
 doc/.ikiwiki/*
 html/*
 ikiwiki.out
@@ -9,6 +10,7 @@ ikiwiki-transition.out
 ikiwiki-calendar.out
 pm_to_blib
 *.man
+/po/cover_db
 po/po2wiki_stamp
 po/underlays/*/*.mdwn
 po/underlays/basewiki/*/*.mdwn
index e1a953f8fea405900f349b1fc19456066cbbd68e..b19636c60c90ad5fbc0db4bbb0b7c0ba0904fa5d 100755 (executable)
@@ -154,6 +154,13 @@ extra_install: underlay_install
        -install -m 0644 wikilist $(DESTDIR)/etc/ikiwiki
        -install -m 0644 auto.setup $(DESTDIR)/etc/ikiwiki
        -install -m 0644 auto-blog.setup $(DESTDIR)/etc/ikiwiki
+
+# The git/hg plugins want to chdir; so does Devel::Cover. Skip those tests
+# to stop them hurting each other.
+coverage:
+       cover -delete
+       $(MAKE) test PERL5OPT=-MDevel::Cover PERL5LIB=. TEST_FILES="$(filter-out t/git.t t/mercurial.t,$(wildcard t/*.t))"
+       cover
 }
 }