From c5b066d5eb9f3426ced540f139160baa793071ad Mon Sep 17 00:00:00 2001 From: Zachary Snow Date: Fri, 11 Dec 2020 12:40:21 -0700 Subject: [PATCH] code coverage target --- .gitignore | 2 ++ Makefile | 7 +++++++ 2 files changed, 9 insertions(+) diff --git a/.gitignore b/.gitignore index 58643f8..50047a1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,5 @@ dist/ bin/ .stack-work/ +.hpc/ +*.tix diff --git a/Makefile b/Makefile index 0345e0f..92cc86d 100644 --- a/Makefile +++ b/Makefile @@ -12,3 +12,10 @@ clean: test: (cd test && ./run-all.sh) + +coverage: + stack install --local-bin-path bin --ghc-options=-fhpc + rm -f test/*/sv2v.tix + make test + stack exec hpc -- sum test/*/sv2v.tix --union --output=.hpc/combined.tix + stack exec hpc -- markup .hpc/combined.tix --destdir=.hpc