From 96e82f5a957a49c5030034f2f4b2bb65f8e60547 Mon Sep 17 00:00:00 2001 From: hanenMizouni Date: Sat, 23 Nov 2024 14:42:11 +0000 Subject: [PATCH] Combines coverage collection and report generation into a single go test command. Signed-off-by: hanenMizouni --- Makefile | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 34ce8024c..a4d5d03dd 100644 --- a/Makefile +++ b/Makefile @@ -157,12 +157,9 @@ checkfmt: ## check gofmt .PHONY: unit-test unit-test: - go test -v -coverprofile=covers.out ./controllers - go tool cover -func=covers.out -o covers.txt - go tool cover -html=covers.out -o covers.html - go test -v -coverprofile=apicovers.out ./api/v1beta1 - go tool cover -func=apicovers.out -o apicovers.txt - go tool cover -html=apicovers.out -o apicovers.html + go test -v -timeout 20m -p 4 -coverprofile=coverage.cov ./... + go tool cover -func=coverage.cov -o coverage.txt + go tool cover -html=coverage.cov -o coverage.html .PHONY: cloud-init-secret cloud-init-secret: