Skip to content

Commit cfbb225

Browse files
lhauspietheodesp
authored andcommitted
feat(test): Merge all coverage in one file to parse it with codecov.io (#37)
1 parent 181ab88 commit cfbb225

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,14 @@ debs:
1010

1111
.PHONY: test
1212
test:
13-
GOPATH=$(GOPATH) go test -race $$(go list ./... | grep -v example) -coverprofile=coverage.txt -covermode=atomic
13+
-rm coverage.txt
14+
@for package in $$(go list ./... | grep -v example) ; do \
15+
GOPATH=$(GOPATH) go test -race -coverprofile=profile.out -covermode=atomic $$package ; \
16+
if [ -f profile.out ]; then \
17+
cat profile.out >> coverage.txt ; \
18+
rm profile.out ; \
19+
fi \
20+
done
1421

1522
.PHONY: bench
1623
bench:

0 commit comments

Comments
 (0)