makefile: Add test-cover-html - hugo - [fork] hugo port for 9front
HTML git clone git@git.drkhsh.at/hugo.git
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit b7e800454f985b5f23753452d2f51056f1327239
DIR parent 20d82a7a1bbf571e552915d2320c8b5dc1cfa813
HTML Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date: Sun, 27 Nov 2016 23:21:10 +0100
makefile: Add test-cover-html
Diffstat:
M .gitignore | 5 +++--
M Makefile | 8 ++++++++
2 files changed, 11 insertions(+), 2 deletions(-)
---
DIR diff --git a/.gitignore b/.gitignore
@@ -11,4 +11,5 @@ cover.out
.DS_Store
*~
vendor/*/
-*.bench
-\ No newline at end of file
+*.bench
+coverage*.out
+\ No newline at end of file
DIR diff --git a/Makefile b/Makefile
@@ -7,6 +7,7 @@
COMMIT_HASH=`git rev-parse --short HEAD 2>/dev/null`
BUILD_DATE=`date +%FT%T%z`
LDFLAGS=-ldflags "-X github.com/spf13/hugo/hugolib.CommitHash=${COMMIT_HASH} -X github.com/spf13/hugo/hugolib.BuildDate=${BUILD_DATE}"
+PACKAGES = $(shell govendor list -no-status +local | sed 's/github.com.spf13.hugo/./')
all: gitinfo
@@ -74,3 +75,9 @@ vet:
echo "^ go vet errors!" && echo && exit 1; \
fi
+test-cover-html:
+ echo "mode: count" > coverage-all.out
+ $(foreach pkg,$(PACKAGES),\
+ govendor test -coverprofile=coverage.out -covermode=count $(pkg);\
+ tail -n +2 coverage.out >> coverage-all.out;)
+ go tool cover -html=coverage-all.out
+\ No newline at end of file