make: allow optional extra tags when running unit tests
This commit is contained in:
parent
9c47392dfa
commit
357cd7d7a7
2
Makefile
2
Makefile
@ -43,8 +43,6 @@ GOTEST := GO111MODULE=on go test
|
||||
|
||||
GOVERSION := $(shell go version | awk '{print $$3}')
|
||||
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
|
||||
CP := cp
|
||||
|
@ -28,6 +28,10 @@ ifneq ($(icase),)
|
||||
TEST_FLAGS += -test.run=TestLightningNetworkDaemon/$(icase)
|
||||
endif
|
||||
|
||||
ifneq ($(tags),)
|
||||
DEV_TAGS += ${tags}
|
||||
endif
|
||||
|
||||
# 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.
|
||||
ifneq ($(log),)
|
||||
@ -44,6 +48,9 @@ else
|
||||
TEST_FLAGS += -test.timeout=40m
|
||||
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
|
||||
# not being targeted.
|
||||
UNIT_TARGETED ?= no
|
||||
|
Loading…
Reference in New Issue
Block a user