Merge branch 'bboreham-make-tests-stop'

Closes #557
This commit is contained in:
Matthias Radestock committed 2015-04-14 18:03:42 +01:00
commit f9ea3f54d1
1 file changed
+7 -3
+7 -3
View File
@@ -69,14 +69,18 @@ $(DOCKER_DISTRIB):
tests: tests:
echo "mode: count" > profile.cov echo "mode: count" > profile.cov
fail=0 ; \
for dir in $$(find . -type f -name '*_test.go' | xargs -n1 dirname | sort -u); do \ for dir in $$(find . -type f -name '*_test.go' | xargs -n1 dirname | sort -u); do \
output=$$(mktemp cover.XXXXXXXXXX); \ output=$$(mktemp cover.XXXXXXXXXX) ; \
go test -tags netgo -covermode=count -coverprofile=$$output $$dir; \ if ! go test -tags netgo -covermode=count -coverprofile=$$output $$dir ; then \
fail=1 ; \
fi ; \
if [ -f $$output ]; then \ if [ -f $$output ]; then \
tail -n +2 <$$output >>profile.cov; \ tail -n +2 <$$output >>profile.cov; \
rm $$output; \ rm $$output; \
fi \ fi \
done done ; \
exit $$fail
go tool cover -html=profile.cov -o=coverage.html go tool cover -html=profile.cov -o=coverage.html
$(PUBLISH): publish_%: $(PUBLISH): publish_%: