make: move UNIT variables to testing_flags.mk

And use the new COMPILE_TAGS variable for the unit commands instead of
LND_RELEASE_TAGS.
This commit is contained in:
Elle Mouton 2025-01-05 09:11:58 +02:00
parent 8c64e27b53
commit 43e1c9ee2d
No known key found for this signature in database
GPG key ID: D7D916376026F177
2 changed files with 7 additions and 5 deletions

View file

@ -57,9 +57,6 @@ XARGS := xargs -L 1
LINT = $(LINT_BIN) run -v
UNIT := $(GOLIST) | $(XARGS) env $(GOTEST)
UNIT_RACE := $(UNIT) -race
include make/release_flags.mk
include make/testing_flags.mk
@ -199,7 +196,7 @@ check: unit
unit:
@$(call print, "Running unit tests.")
mkdir -p app/build && touch app/build/index.html
$(UNIT) -tags="$(LND_RELEASE_TAGS)"
$(UNIT)
unit-cover: $(GOACC_BIN)
@$(call print, "Running unit coverage tests.")
@ -208,7 +205,7 @@ unit-cover: $(GOACC_BIN)
unit-race:
@$(call print, "Running unit race tests.")
mkdir -p app/build && touch app/build/index.html
env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(UNIT_RACE) -tags="$(LND_RELEASE_TAGS)"
env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(UNIT_RACE)
clean-itest:
@$(call print, "Cleaning itest binaries.")

View file

@ -1,6 +1,11 @@
include make/compile_flags.mk
ITEST_FLAGS =
# Define the integration test.run filter if the icase argument was provided.
ifneq ($(icase),)
ITEST_FLAGS += -test.run="TestLightningTerminal/$(icase)"
endif
UNIT := $(GOLIST) | $(XARGS) env $(GOTEST) -tags="$(COMPILE_TAGS)"
UNIT_RACE := $(UNIT) -race