@@ -74,7 +74,9 @@ bench.%: ## Runs go benchmarks for a specific module
74
74
bench.% : ; $(info $(M ) running benchmarks$(if $(GOTEST_RUN ) , matching "$(GOTEST_RUN ) ") for $* module)
75
75
$(if $(filter-out root,$* ) ,cd $* && ) go test $(if $(GOTEST_RUN ) ,-run "$(GOTEST_RUN ) ") -race -cover -v ./...
76
76
77
- E2E_PARALLEL_NODES ?= $(shell nproc --ignore=1)
77
+ E2E_DRYRUN ?= false
78
+ E2E_VERBOSE ?= $(filter $(E2E_DRYRUN )$(CI ) ,true) # If dry-run or CI, enable verbosity
79
+ E2E_PARALLEL_NODES ?= $(if $(filter $(E2E_DRYRUN ) ,true) ,1,$(shell nproc --ignore=1) ) # Ginkgo cannot dry-run in parallel
78
80
E2E_FLAKE_ATTEMPTS ?= 1
79
81
E2E_CONF_FILE ?= $(REPO_ROOT ) /test/e2e/config/caren.yaml
80
82
E2E_CONF_FILE_ENVSUBST ?= $(basename $(E2E_CONF_FILE ) ) -envsubst.yaml
@@ -88,7 +90,7 @@ e2e-test:
88
90
ifneq ($(SKIP_BUILD ) ,true)
89
91
$(MAKE) GORELEASER_FLAGS=$$'--config=<(env GOOS=$(shell go env GOOS) GOARCH=$(shell go env GOARCH) gojq --yaml-input --yaml-output \'del(.builds[0].goarch) | del(.builds[0].goos) | .builds[0].targets|=(["linux_amd64","linux_arm64",env.GOOS+"_"+env.GOARCH] | unique | map(. | sub("_amd64";"_amd64_v1")))\' .goreleaser.yml)' release-snapshot
90
92
endif
91
- $(info $(M) running e2e tests$(if $(E2E_LABEL), labelled "$(E2E_LABEL)")$(if $(E2E_FOCUS), matching "$(E2E_FOCUS)"))
93
+ $(info $(M) $(if $(E2E_DRYRUN),dry-,) running e2e tests$(if $(E2E_LABEL), labelled "$(E2E_LABEL)")$(if $(E2E_FOCUS), matching "$(E2E_FOCUS)"))
92
94
env E2E_IMAGE_TAG="$$(gojq --raw-output '.version' $(REPO_ROOT)/dist/metadata.json)" \
93
95
envsubst -no-unset -no-empty -i '$(E2E_CONF_FILE)' -o '$(E2E_CONF_FILE_ENVSUBST)'
94
96
env AWS_B64ENCODED_CREDENTIALS="$$(clusterawsadm bootstrap credentials encode-as-profile 2>/dev/null)" \
@@ -100,11 +102,12 @@ endif
100
102
--randomize-suites \
101
103
--fail-on-pending \
102
104
--keep-going \
103
- $(if $(filter $(CI ),true),-v ) \
105
+ $(if $(filter $(E2E_VERBOSE ),true),--vv ) \
104
106
--covermode=atomic \
105
107
--coverprofile coverage-e2e.out \
106
- --procs=$(E2E_PARALLEL_NODES) \
107
- --compilers=$(E2E_PARALLEL_NODES) \
108
+ $(if $(filter $(E2E_DRYRUN), true),--dry-run) \
109
+ --procs=$(E2E_PARALLEL_NODES) \
110
+ --compilers=$(E2E_PARALLEL_NODES) \
108
111
--flake-attempts=$(E2E_FLAKE_ATTEMPTS) \
109
112
$(if $(E2E_FOCUS),--focus="$(E2E_FOCUS)") \
110
113
$(if $(E2E_SKIP),--skip="$(E2E_SKIP)") \
0 commit comments