mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-18 19:41:21 +02:00
Allow unit-cover target for make to filter by package
Previous to this commit, running `make unit-cover pkg=xx` would ignore the selected package and run unit tests and coverage for all packages. After this commit, the package selected with pkg= is the only one that is tested and coverage output generated for. If no pkg is selected, the default is as before, all pkgs.
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
DEV_TAGS = dev
|
||||
LOG_TAGS =
|
||||
TEST_FLAGS =
|
||||
COVER_PKG = $$(go list ./... | grep -v lnrpc)
|
||||
|
||||
# If specific package is being unit tested, construct the full name of the
|
||||
# subpackage.
|
||||
ifneq ($(pkg),)
|
||||
UNITPKG := $(PKG)/$(pkg)
|
||||
UNIT_TARGETED = yes
|
||||
COVER_PKG = $(PKG)/$(pkg)
|
||||
endif
|
||||
|
||||
# If a specific unit test case is being target, construct test.run filter.
|
||||
|
Reference in New Issue
Block a user