make: allow optional extra tags when running unit tests
This commit is contained in:
2 files changed
+7
-2
No files matched your search
@@ -43,8 +43,6 @@ GOTEST := GO111MODULE=on go test
|
|||||||
|
|
||||||
GOVERSION := $(shell go version | awk '{print $$3}')
|
GOVERSION := $(shell go version | awk '{print $$3}')
|
||||||
GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "./vendor/*")
|
GOFILES_NOVENDOR = $(shell find . -type f -name '*.go' -not -path "./vendor/*")
|
||||||
GOLIST := go list -deps $(PKG)/... | grep '$(PKG)'| grep -v '/vendor/'
|
|
||||||
GOLISTCOVER := $(shell go list -deps -f '{{.ImportPath}}' ./... | grep '$(PKG)' | sed -e 's/^$(ESCPKG)/./')
|
|
||||||
|
|
||||||
RM := rm -f
|
RM := rm -f
|
||||||
CP := cp
|
CP := cp
|
||||||
|
|||||||
@@ -28,6 +28,10 @@ ifneq ($(icase),)
|
|||||||
TEST_FLAGS += -test.run=TestLightningNetworkDaemon/$(icase)
|
TEST_FLAGS += -test.run=TestLightningNetworkDaemon/$(icase)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($(tags),)
|
||||||
|
DEV_TAGS += ${tags}
|
||||||
|
endif
|
||||||
|
|
||||||
# Define the log tags that will be applied only when running unit tests. If none
|
# Define the log tags that will be applied only when running unit tests. If none
|
||||||
# are provided, we default to "nolog" which will be silent.
|
# are provided, we default to "nolog" which will be silent.
|
||||||
ifneq ($(log),)
|
ifneq ($(log),)
|
||||||
@@ -44,6 +48,9 @@ else
|
|||||||
TEST_FLAGS += -test.timeout=40m
|
TEST_FLAGS += -test.timeout=40m
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
GOLIST := go list -tags="$(DEV_TAGS)" -deps $(PKG)/... | grep '$(PKG)'| grep -v '/vendor/'
|
||||||
|
GOLISTCOVER := $(shell go list -tags="$(DEV_TAGS)" -deps -f '{{.ImportPath}}' ./... | grep '$(PKG)' | sed -e 's/^$(ESCPKG)/./')
|
||||||
|
|
||||||
# UNIT_TARGTED is undefined iff a specific package and/or unit test case is
|
# UNIT_TARGTED is undefined iff a specific package and/or unit test case is
|
||||||
# not being targeted.
|
# not being targeted.
|
||||||
UNIT_TARGETED ?= no
|
UNIT_TARGETED ?= no
|
||||||
|
|||||||
Reference in new issue
Block a user