From f0103e09ca54c488f9e65f9b67f95313605d852b Mon Sep 17 00:00:00 2001 From: rabi Date: Mon, 14 Oct 2024 12:17:13 +0530 Subject: [PATCH] Run functional tests in parallel It seems to take lot of time running locally. Signed-off-by: rabi --- Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Makefile b/Makefile index 34e5dceac..9fe289563 100644 --- a/Makefile +++ b/Makefile @@ -167,6 +167,11 @@ golangci-lint: test -s $(LOCALBIN)/golangci-lint || curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.59.1 $(LOCALBIN)/golangci-lint run --fix +MAX_PROCS := 5 +NUM_PROCS := $(shell expr $(shell nproc --ignore 2) / 2) +PROCS ?= $(shell if [ $(NUM_PROCS) -gt $(MAX_PROCS) ]; then echo $(MAX_PROCS); else echo $(NUM_PROCS); fi) +PROC_CMD = --procs $(PROCS) + .PHONY: test test: manifests generate gowork fmt vet envtest ginkgo ginkgo-run ## Run ginkgo tests with dependencies.