Skip to content

Commit b602f43

Browse files
committed
Remove "zz_generated*" files from test coverage
1 parent 139af12 commit b602f43

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,9 @@ setup-envtest: install-setup-envtest # Build setup-envtest from tools folder.
171171
.PHONY: test
172172
test: setup-envtest ## Run tests
173173
KUBEBUILDER_ASSETS="$(KUBEBUILDER_ASSETS)" go test -coverprofile=coverage.out ./... $(TEST_ARGS)
174-
go tool cover -func=coverage.out -o coverage.txt
175-
go tool cover -html=coverage.out -o coverage.html
174+
grep -v 'zz_generated' coverage.out > coverage_filtered.out
175+
go tool cover -func=coverage_filtered.out -o coverage.txt
176+
go tool cover -html=coverage_filtered.out -o coverage.html
176177

177178
##@ Build
178179

0 commit comments

Comments
 (0)