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 <pholzing@redhat.com>
This commit is contained in:
Paul Holzinger 2023-05-02 12:30:18 +02:00
parent 5af4339237
commit 3858a833bf
No known key found for this signature in database
GPG Key ID: EB145DD938A3CAF2
1 changed files with 3 additions and 4 deletions

View File

@ -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: