aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2019-08-04 17:47:43 +0200
committerGitHub <noreply@github.com>2019-08-04 17:47:43 +0200
commita0c8105a91910a022fe2b8d154f0a9ee777f7310 (patch)
tree19ffecc6e5b98d48ce9f982488b3615d6b11644c
parent6f354807f63e3479e41e56d72866291eeac9251e (diff)
parent1124ff89a63af3bae0c64967a5dac129feac7d0c (diff)
downloadgo-git-a0c8105a91910a022fe2b8d154f0a9ee777f7310.tar.gz
Merge pull request #1205 from knqyf263/fix/test_coverage
Add -coverpkg to fix test coverage
-rw-r--r--Makefile12
1 files changed, 1 insertions, 11 deletions
diff --git a/Makefile b/Makefile
index d576778..3866fb7 100644
--- a/Makefile
+++ b/Makefile
@@ -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