Commits

Bryan O'Sullivan  committed 3df62a3

Generate hpc coverage reports.

  • Participants
  • Parent commits 7783eac

Comments (0)

Files changed (1)

File tests/Makefile

 lib-srcs := $(shell grep '^  *Data' ../text.cabal | \
                     sed -e 's,\.,/,g' -e 's,$$,.hs,')
 
-all: qc qc-hpc
+all: qc coverage
 
 lib: $(lib)
 
 
 qc-hpc: Properties.hs QuickCheckUtils.hs $(lib-srcs:%=../%)
 	-mkdir -p hpcdir
-	rm -f $@.tix
 	$(ghc) $(ghc-hpc-flags) -ihpcdir --make -o $@ $<
 
+coverage: qc-hpc-html/hpc_index.html
+
+qc-hpc-html/hpc_index.html: qc-hpc
+	./qc-hpc
+	hpc markup qc-hpc --exclude=Main --exclude=Properties \
+	  --exclude=QuickCheckUtils --srcdir=.. --srcdir=. --destdir=$(dir $@)
+
 %.o: %.hs
 	$(ghc) $(ghc-flags) -c -o $@ $<
 
 	curl -O http://projects.haskell.org/text/text-testdata.tar.bz2
 
 clean:
-	-rm -rf *.o *.hi qc qc-hpc hpcdir .hpc
+	-rm -rf *.o *.hi *.tix qc qc-hpc hpcdir .hpc qc-hpc-html