Skip to content

Commit d09f74d

Browse files
committed
Allow test-unit filter on package and test
Have to have package filter too, to not run all the unit tests due to UNIT_TEST_DIRS Signed-off-by: Brett Tofel <[email protected]>
1 parent c426735 commit d09f74d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,8 @@ test-unit: $(SETUP_ENVTEST) envtest-k8s-bins #HELP Run the unit tests
224224
-tags '$(GO_BUILD_TAGS)' \
225225
-cover -coverprofile ${ROOT_DIR}/coverage/unit.out \
226226
-count=1 -race -short \
227-
$(UNIT_TEST_DIRS) \
227+
-run "$(if $(TEST_FILTER),$(TEST_FILTER),.)" \
228+
$(if $(TEST_PKG),$(TEST_PKG),$(UNIT_TEST_DIRS)) \
228229
-test.gocoverdir=$(COVERAGE_UNIT_DIR)
229230

230231
.PHONY: image-registry

0 commit comments

Comments
 (0)