Skip to content

Commit 8b07b3f

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 <btofel@redhat.com>
1 parent 4feb93a commit 8b07b3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,8 @@ test-unit: $(SETUP_ENVTEST) envtest-k8s-bins #HELP Run the unit tests
211211
-tags '$(GO_BUILD_TAGS)' \
212212
-cover -coverprofile ${ROOT_DIR}/coverage/unit.out \
213213
-count=1 -race -short \
214-
$(UNIT_TEST_DIRS) \
214+
-run "$(if $(TEST_FILTER),$(TEST_FILTER),.)" \
215+
$(if $(TEST_PKG),$(TEST_PKG),$(UNIT_TEST_DIRS)) \
215216
-test.gocoverdir=$(COVERAGE_UNIT_DIR)
216217

217218
.PHONY: image-registry

0 commit comments

Comments
 (0)