mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
make: add make unit-bench command
This commit is contained in:
parent
fe28ff7e60
commit
5898e35762
2 changed files with 12 additions and 1 deletions
8
Makefile
8
Makefile
|
|
@ -214,6 +214,12 @@ unit-debug:
|
|||
mkdir -p app/build && touch app/build/index.html
|
||||
$(UNIT_DEBUG)
|
||||
|
||||
#? unit-bench: Run benchmark tests
|
||||
unit-bench:
|
||||
@$(call print, "Running benchmark tests.")
|
||||
mkdir -p app/build && touch app/build/index.html
|
||||
$(UNIT_BENCH)
|
||||
|
||||
unit-cover: $(GOACC_BIN)
|
||||
@$(call print, "Running unit coverage tests.")
|
||||
$(GOACC_BIN) $(COVER_PKG)
|
||||
|
|
@ -345,7 +351,7 @@ flakehunter-unit:
|
|||
# include in the build process.
|
||||
.PHONY: default all yarn-install build install go-build go-build-noui \
|
||||
go-install go-install-noui go-install-cli app-build release go-release \
|
||||
docker-release docker-tools scratch check unit unit-cover unit-race \
|
||||
docker-release docker-tools scratch check unit unit-bench unit-cover unit-race \
|
||||
clean-itest build-itest build-itest-binary itest-only itest \
|
||||
itest-parallel flake-unit fmt lint \
|
||||
mod mod-check list rpc protos protos-check rpc-js-compile clean
|
||||
|
|
|
|||
|
|
@ -72,11 +72,16 @@ UNIT_TARGETED ?= no
|
|||
ifeq ($(UNIT_TARGETED), yes)
|
||||
UNIT := $(GOTEST) -tags="$(DEV_TAGS) $(COMPILE_TAGS)" $(TEST_FLAGS) $(UNITPKG)
|
||||
UNIT_DEBUG := $(GOTEST) -v -tags="$(DEV_TAGS) $(COMPILE_TAGS)" $(TEST_FLAGS) $(UNITPKG)
|
||||
UNIT_BENCH := $(GOTEST) -tags="$(DEV_TAGS) $(COMPILE_TAGS)" \
|
||||
-test.bench=. -test.benchmem -test.run=NONE $(UNITPKG)
|
||||
endif
|
||||
|
||||
ifeq ($(UNIT_TARGETED), no)
|
||||
UNIT := $(GOLIST) | $(XARGS) env $(GOTEST) -tags="$(DEV_TAGS) $(COMPILE_TAGS)" $(TEST_FLAGS)
|
||||
UNIT_DEBUG := $(GOLIST) | $(XARGS) env $(GOTEST) -v -tags="$(DEV_TAGS) $(COMPILE_TAGS)" $(TEST_FLAGS)
|
||||
UNIT_BENCH := $(GOLIST) | $(XARGS) env $(GOTEST) \
|
||||
-tags="$(DEV_TAGS) $(COMPILE_TAGS)" -test.bench=. -test.benchmem \
|
||||
-test.run=NONE
|
||||
endif
|
||||
|
||||
UNIT_RACE := $(UNIT) -race
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue