Skip to content

Commit

Permalink
Simplify test coverage collection (#2560)
Browse files Browse the repository at this point in the history
* Simplify test coverage script by running go test command

Signed-off-by: Pankhudi Bhonsle <pankhubh@thoughtworks.com>

* Modify coverage make task to take coverprofile flag

Signed-off-by: Pankhudi Bhonsle <pankhubh@thoughtworks.com>

* Remove pre-compilation of test and TODO comment

Signed-off-by: Pankhudi Bhonsle <psbhonsle08@gmail.com>

Co-authored-by: Pankhudi Bhonsle <pankhubh@thoughtworks.com>
  • Loading branch information
PankhudiB and Pankhudi Bhonsle authored Oct 14, 2020
1 parent 3ae29da commit bd59f13
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 68 deletions.
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,7 @@ all-srcs:

.PHONY: cover
cover: nocover
@echo pre-compiling tests
@time go test -i $(shell go list ./...)
# TODO Switch to single `go test` that already supports multiple packages, but watch out for .nocover dirs.
@./scripts/cover.sh $(shell go list ./...)
$(GOTEST) -coverprofile cover.out ./...
grep -E -v 'model.pb.*.go' cover.out > cover-nogen.out
mv cover-nogen.out cover.out
go tool cover -html=cover.out -o cover.html
Expand Down
64 changes: 0 additions & 64 deletions scripts/cover.sh

This file was deleted.

0 comments on commit bd59f13

Please sign in to comment.