Skip to content

Commit 712c3dc

Browse files
authored
Fix makefile ci target and coverage test packages (#1634)
1 parent 841d2a5 commit 712c3dc

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Makefile

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ TIMEOUT = 60
2828

2929
.PHONY: precommit ci
3030
precommit: dependabot-check license-check lint build examples test-default
31-
ci: precommit check-clean-work-tree test-with-coverage
31+
ci: precommit check-clean-work-tree test-coverage
3232

3333
# Tools
3434

@@ -114,9 +114,11 @@ test-coverage:
114114
for dir in $(ALL_COVERAGE_MOD_DIRS); do \
115115
echo "$(GO) test -coverpkg=./... -covermode=$(COVERAGE_MODE) -coverprofile="$(COVERAGE_PROFILE)" $${dir}/..."; \
116116
(cd "$${dir}" && \
117-
$(GO) test -coverpkg=./... -covermode=$(COVERAGE_MODE) -coverprofile="$(COVERAGE_PROFILE)" ./... && \
118-
$(GO) tool cover -html=coverage.out -o coverage.html); \
119-
[ -f "$${dir}/coverage.out" ] && cat "$${dir}/coverage.out" >> coverage.txt; \
117+
$(GO) list ./... \
118+
| grep -v third_party \
119+
| xargs $(GO) test -coverpkg=./... -covermode=$(COVERAGE_MODE) -coverprofile="$(COVERAGE_PROFILE)" && \
120+
$(GO) tool cover -html=coverage.out -o coverage.html); \
121+
[ -f "$${dir}/coverage.out" ] && cat "$${dir}/coverage.out" >> coverage.txt; \
120122
done; \
121123
sed -i.bak -e '2,$$ { /^mode: /d; }' coverage.txt
122124

0 commit comments

Comments
 (0)