diff options
author | knqyf263 <knqyf263@gmail.com> | 2019-08-04 00:49:58 -1000 |
---|---|---|
committer | knqyf263 <knqyf263@gmail.com> | 2019-08-04 00:57:19 -1000 |
commit | 1124ff89a63af3bae0c64967a5dac129feac7d0c (patch) | |
tree | 4c8a3545df0163c3ae03f150766ecdfacd46137e /Makefile | |
parent | 0d1a009cbb604db18be960db5f1525b99a55d727 (diff) | |
download | go-git-1124ff89a63af3bae0c64967a5dac129feac7d0c.tar.gz |
Add -coverpkg to fix test coverage
Signed-off-by: knqyf263 <knqyf263@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 12 |
1 files changed, 1 insertions, 11 deletions
@@ -12,7 +12,6 @@ GIT_REPOSITORY = http://github.com/git/git.git # Coverage COVERAGE_REPORT = coverage.txt -COVERAGE_PROFILE = profile.out COVERAGE_MODE = atomic ifneq ($(origin CI), undefined) @@ -37,16 +36,7 @@ test: test-coverage: @cd $(WORKDIR); \ echo "" > $(COVERAGE_REPORT); \ - for dir in `find . -name "*.go" | grep -o '.*/' | sort | uniq`; do \ - $(GOTEST) $$dir -coverprofile=$(COVERAGE_PROFILE) -covermode=$(COVERAGE_MODE); \ - if [ $$? != 0 ]; then \ - exit 2; \ - fi; \ - if [ -f $(COVERAGE_PROFILE) ]; then \ - cat $(COVERAGE_PROFILE) >> $(COVERAGE_REPORT); \ - rm $(COVERAGE_PROFILE); \ - fi; \ - done; \ + $(GOTEST) -coverprofile=$(COVERAGE_REPORT) -coverpkg=./... -covermode=$(COVERAGE_MODE) ./... clean: rm -rf $(GIT_DIST_PATH)
\ No newline at end of file |