From 7f9dcc143f52097a4a8f61f7516d7722cb119f5a Mon Sep 17 00:00:00 2001 From: Conner Fromknecht Date: Wed, 17 Feb 2021 08:47:14 -0800 Subject: [PATCH] make: add unit-debug target --- Makefile | 5 +++++ make/testing_flags.mk | 2 ++ 2 files changed, 7 insertions(+) diff --git a/Makefile b/Makefile index eef8a400..7f95afe9 100644 --- a/Makefile +++ b/Makefile @@ -192,6 +192,10 @@ unit: btcd @$(call print, "Running unit tests.") $(UNIT) +unit-debug: btcd + @$(call print, "Running debug unit tests.") + $(UNIT_DEBUG) + unit-cover: $(GOACC_BIN) @$(call print, "Running unit coverage tests.") $(GOACC_BIN) $(COVER_PKG) -- -tags="$(DEV_TAGS) $(LOG_TAGS)" @@ -316,6 +320,7 @@ clean-mobile: itest-only \ itest \ unit \ + unit-debug \ unit-cover \ unit-race \ goveralls \ diff --git a/make/testing_flags.mk b/make/testing_flags.mk index cdfc4d6f..7637d601 100644 --- a/make/testing_flags.mk +++ b/make/testing_flags.mk @@ -86,11 +86,13 @@ UNIT_TARGETED ?= no # targeted case. Otherwise, default to running all tests. ifeq ($(UNIT_TARGETED), yes) UNIT := $(GOTEST) -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) endif ifeq ($(UNIT_TARGETED), no) 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_RACE := $(UNIT) -race endif