Skip to content

Commit

Permalink
Drop UNIT_TEST_DIRS for TEST_PKGS + TEST_FILTER
Browse files Browse the repository at this point in the history
Signed-off-by: Brett Tofel <[email protected]>
  • Loading branch information
bentito committed Mar 3, 2025
1 parent 8b07b3f commit 8f5b7eb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,10 @@ test-ext-dev-e2e: $(OPERATOR_SDK) $(KUSTOMIZE) $(KIND) #HELP Run extension creat
go test -count=1 -v ./test/extension-developer-e2e/...

ENVTEST_VERSION := $(shell go list -m k8s.io/client-go | cut -d" " -f2 | sed 's/^v0\.\([[:digit:]]\{1,\}\)\.[[:digit:]]\{1,\}$$/1.\1.x/')
UNIT_TEST_DIRS := $(shell go list ./... | grep -v /test/ | grep -v /catalogd/test/)
# Define TEST_PKGS to be either user-specified or a default set of packages:
ifeq ($(origin TEST_PKGS), undefined)
TEST_PKGS := $(shell go list ./... | grep -v /test/ | grep -v /catalogd/test/)
endif
COVERAGE_UNIT_DIR := $(ROOT_DIR)/coverage/unit

.PHONY: envtest-k8s-bins #HELP Uses setup-envtest to download and install the binaries required to run ENVTEST-test based locally at the project/bin directory.
Expand All @@ -212,7 +215,7 @@ test-unit: $(SETUP_ENVTEST) envtest-k8s-bins #HELP Run the unit tests
-cover -coverprofile ${ROOT_DIR}/coverage/unit.out \
-count=1 -race -short \
-run "$(if $(TEST_FILTER),$(TEST_FILTER),.)" \
$(if $(TEST_PKG),$(TEST_PKG),$(UNIT_TEST_DIRS)) \
$(TEST_PKGS) \
-test.gocoverdir=$(COVERAGE_UNIT_DIR)

.PHONY: image-registry
Expand Down

0 comments on commit 8f5b7eb

Please sign in to comment.