Skip to content

Commit

Permalink
Makefile: do not run machine test in parallel
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
Luap99 committed May 2, 2023
1 parent 5af4339 commit 3858a83
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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:
Expand All @@ -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:
Expand Down

0 comments on commit 3858a83

Please sign in to comment.