Merge pull request #3101 from AdamISZ/make-unit-cover-pkg
Allow unit-cover target for make to filter by package
This commit is contained in:
commit
6e102d64b9
3
Makefile
3
Makefile
@ -126,7 +126,8 @@ unit: btcd
|
|||||||
|
|
||||||
unit-cover: $(GOACC_BIN)
|
unit-cover: $(GOACC_BIN)
|
||||||
@$(call print, "Running unit coverage tests.")
|
@$(call print, "Running unit coverage tests.")
|
||||||
$(GOACC_BIN) $$(go list ./... | grep -v lnrpc) -- -test.tags="$(DEV_TAGS) $(LOG_TAGS)"
|
$(GOACC_BIN) $(COVER_PKG) -- -test.tags="$(DEV_TAGS) $(LOG_TAGS)"
|
||||||
|
|
||||||
|
|
||||||
unit-race:
|
unit-race:
|
||||||
@$(call print, "Running unit race tests.")
|
@$(call print, "Running unit race tests.")
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
DEV_TAGS = dev
|
DEV_TAGS = dev
|
||||||
LOG_TAGS =
|
LOG_TAGS =
|
||||||
TEST_FLAGS =
|
TEST_FLAGS =
|
||||||
|
COVER_PKG = $$(go list ./... | grep -v lnrpc)
|
||||||
|
|
||||||
# If specific package is being unit tested, construct the full name of the
|
# If specific package is being unit tested, construct the full name of the
|
||||||
# subpackage.
|
# subpackage.
|
||||||
ifneq ($(pkg),)
|
ifneq ($(pkg),)
|
||||||
UNITPKG := $(PKG)/$(pkg)
|
UNITPKG := $(PKG)/$(pkg)
|
||||||
UNIT_TARGETED = yes
|
UNIT_TARGETED = yes
|
||||||
|
COVER_PKG = $(PKG)/$(pkg)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# If a specific unit test case is being target, construct test.run filter.
|
# If a specific unit test case is being target, construct test.run filter.
|
||||||
|
Loading…
Reference in New Issue
Block a user