Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit 1124ff8

Browse files
committed
Add -coverpkg to fix test coverage
Signed-off-by: knqyf263 <knqyf263@gmail.com>
1 parent 0d1a009 commit 1124ff8

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

‎Makefile‎

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ GIT_REPOSITORY = http://github.com/git/git.git
1212

1313
# Coverage
1414
COVERAGE_REPORT = coverage.txt
15-
COVERAGE_PROFILE = profile.out
1615
COVERAGE_MODE = atomic
1716

1817
ifneq ($(origin CI), undefined)
@@ -37,16 +36,7 @@ test:
3736
test-coverage:
3837
@cd $(WORKDIR); \
3938
echo "" > $(COVERAGE_REPORT); \
40-
for dir in `find . -name "*.go" | grep -o '.*/' | sort | uniq`; do \
41-
$(GOTEST) $$dir -coverprofile=$(COVERAGE_PROFILE) -covermode=$(COVERAGE_MODE); \
42-
if [ $$? != 0 ]; then \
43-
exit 2; \
44-
fi; \
45-
if [ -f $(COVERAGE_PROFILE) ]; then \
46-
cat $(COVERAGE_PROFILE) >> $(COVERAGE_REPORT); \
47-
rm $(COVERAGE_PROFILE); \
48-
fi; \
49-
done; \
39+
$(GOTEST) -coverprofile=$(COVERAGE_REPORT) -coverpkg=./... -covermode=$(COVERAGE_MODE) ./...
5040

5141
clean:
5242
rm -rf $(GIT_DIST_PATH)

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /