mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-06-14 10:51:52 +02:00
make: add benchmark tests
Add benchmark tests as a separate test run besides the current unit tests.
This commit is contained in:
parent
8f4e9d68d0
commit
469dfd5f42
4
Makefile
4
Makefile
@ -196,6 +196,10 @@ unit-race:
|
|||||||
@$(call print, "Running unit race tests.")
|
@$(call print, "Running unit race tests.")
|
||||||
env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(UNIT_RACE)
|
env CGO_ENABLED=1 GORACE="history_size=7 halt_on_errors=1" $(UNIT_RACE)
|
||||||
|
|
||||||
|
unit-bench: $(BTCD_BIN)
|
||||||
|
@$(call print, "Running benchmark tests.")
|
||||||
|
$(UNIT_BENCH)
|
||||||
|
|
||||||
# =============
|
# =============
|
||||||
# FLAKE HUNTING
|
# FLAKE HUNTING
|
||||||
# =============
|
# =============
|
||||||
|
@ -100,12 +100,16 @@ ifeq ($(UNIT_TARGETED), yes)
|
|||||||
UNIT := $(GOTEST) -tags="$(DEV_TAGS) $(LOG_TAGS)" $(TEST_FLAGS) $(UNITPKG)
|
UNIT := $(GOTEST) -tags="$(DEV_TAGS) $(LOG_TAGS)" $(TEST_FLAGS) $(UNITPKG)
|
||||||
UNIT_DEBUG := $(GOTEST) -v -tags="$(DEV_TAGS) $(LOG_TAGS)" $(TEST_FLAGS) $(UNITPKG)
|
UNIT_DEBUG := $(GOTEST) -v -tags="$(DEV_TAGS) $(LOG_TAGS)" $(TEST_FLAGS) $(UNITPKG)
|
||||||
UNIT_RACE := $(GOTEST) -tags="$(DEV_TAGS) $(LOG_TAGS) lowscrypt" $(TEST_FLAGS) -race $(UNITPKG)
|
UNIT_RACE := $(GOTEST) -tags="$(DEV_TAGS) $(LOG_TAGS) lowscrypt" $(TEST_FLAGS) -race $(UNITPKG)
|
||||||
|
# NONE is a special value which selects no other tests but only executes the benchmark tests here.
|
||||||
|
UNIT_BENCH := $(GOTEST) -tags="$(DEV_TAGS) $(LOG_TAGS)" -test.bench=. -test.run=NONE $(UNITPKG)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(UNIT_TARGETED), no)
|
ifeq ($(UNIT_TARGETED), no)
|
||||||
UNIT := $(GOLIST) | $(XARGS) env $(GOTEST) -tags="$(DEV_TAGS) $(LOG_TAGS)" $(TEST_FLAGS)
|
UNIT := $(GOLIST) | $(XARGS) env $(GOTEST) -tags="$(DEV_TAGS) $(LOG_TAGS)" $(TEST_FLAGS)
|
||||||
UNIT_DEBUG := $(GOLIST) | $(XARGS) env $(GOTEST) -v -tags="$(DEV_TAGS) $(LOG_TAGS)" $(TEST_FLAGS)
|
UNIT_DEBUG := $(GOLIST) | $(XARGS) env $(GOTEST) -v -tags="$(DEV_TAGS) $(LOG_TAGS)" $(TEST_FLAGS)
|
||||||
UNIT_RACE := $(UNIT) -race
|
UNIT_RACE := $(UNIT) -race
|
||||||
|
# NONE is a special value which selects no other tests but only executes the benchmark tests here.
|
||||||
|
UNIT_BENCH := $(GOLIST) | $(XARGS) env $(GOTEST) -tags="$(DEV_TAGS) $(LOG_TAGS)" -test.bench=. -test.run=NONE
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user