From 3858a833bfd14d081a47606532eb6fae0aec6b18 Mon Sep 17 00:00:00 2001 From: Paul Holzinger Date: Tue, 2 May 2023 12:30:18 +0200 Subject: [PATCH] Makefile: do not run machine test in parallel while reworking ginkgo to use -p by default we also forced the machine tests to be run in parallel. Right now this does not work at all (something that should be fixed). Using -p is easier becuase that will let ginkgo decide how many parallel nodes to use so it much faster on high core counts. So use some makefile magic to instaed of using `GINKGONODES` use `GINKGO_PARALLEL` and set it to `y` by default. The machine tests will then use that var to disable it. Signed-off-by: Paul Holzinger --- Makefile | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index b8f6e2c063..3df3b56f60 100644 --- a/Makefile +++ b/Makefile @@ -126,8 +126,7 @@ LIBSECCOMP_COMMIT := v2.3.3 GINKGOTIMEOUT ?= -timeout=90m # By default, run test/e2e GINKGOWHAT ?= test/e2e/. -# By default, run tests in parallel across 3 nodes. -GINKGONODES ?= 3 +GINKGO_PARALLEL=y GINKGO ?= ./test/tools/build/ginkgo # Conditional required to produce empty-output if binary not built yet. @@ -559,7 +558,7 @@ test: localunit localintegration remoteintegration localsystem remotesystem ## .PHONY: ginkgo-run ginkgo-run: .install.ginkgo $(GINKGO) version - $(GINKGO) -vv $(TESTFLAGS) --tags "$(TAGS) remote" $(GINKGOTIMEOUT) --flake-attempts 3 --trace --no-color -p $(GINKGOWHAT) $(HACK) + $(GINKGO) -vv $(TESTFLAGS) --tags "$(TAGS) remote" $(GINKGOTIMEOUT) --flake-attempts 3 --trace --no-color $(if $(findstring y,$(GINKGO_PARALLEL)),-p,) $(GINKGOWHAT) $(HACK) .PHONY: ginkgo ginkgo: @@ -581,7 +580,7 @@ remoteintegration: test-binaries ginkgo-remote .PHONY: localmachine localmachine: test-binaries .install.ginkgo - $(MAKE) ginkgo-run GINKGONODES=1 GINKGOWHAT=pkg/machine/e2e/. HACK= + $(MAKE) ginkgo-run GINKGO_PARALLEL=n GINKGOWHAT=pkg/machine/e2e/. HACK= .PHONY: localsystem localsystem: