Skip to content

Commit f1e4bd3

Browse files
authored
improve the readable of test-unit make target (#1614)
1 parent 248f4e9 commit f1e4bd3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,9 @@ test: generate fmt vet envtest image-build verify-crds ## Run tests.
138138

139139
.PHONY: test-unit
140140
test-unit: ## Run unit tests.
141-
CGO_ENABLED=1 KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test ./pkg/... -race -coverprofile cover.out
141+
CGO_ENABLED=1 KUBEBUILDER_ASSETS="$(shell $(ENVTEST) use $(ENVTEST_K8S_VERSION) --bin-dir $(LOCALBIN) -p path)" go test ./pkg/... -race -coverprofile cover.out; \
142+
go tool cover -func=cover.out; \
143+
rm cover.out
142144

143145
.PHONY: test-integration
144146
test-integration: envtest ## Run integration tests.

0 commit comments

Comments
 (0)