@@ -96,9 +96,14 @@ check: unit
9696unit :
9797 @$(call print, "Running unit tests.")
9898 $(GOTEST_DEV ) ./... -test.timeout=20m
99+ cd address && $(GOTEST_DEV ) ./... -test.timeout=20m
99100 cd btcec && $(GOTEST_DEV ) ./... -test.timeout=20m
100101 cd btcutil && $(GOTEST_DEV ) ./... -test.timeout=20m
101- cd btcutil/psbt && $(GOTEST_DEV ) ./... -test.timeout=20m
102+ cd chaincfg && $(GOTEST_DEV ) ./... -test.timeout=20m
103+ cd chainhash && $(GOTEST_DEV ) ./... -test.timeout=20m
104+ cd txscript && $(GOTEST_DEV ) ./... -test.timeout=20m
105+ cd psbt && $(GOTEST_DEV ) ./... -test.timeout=20m
106+ cd wire && $(GOTEST_DEV ) ./... -test.timeout=20m
102107
103108# ? unit-cover: Run unit coverage tests
104109unit-cover :
@@ -107,17 +112,27 @@ unit-cover:
107112
108113 # We need to remove the /v2 pathing from the module to have it work
109114 # nicely with the CI tool we use to render live code coverage.
115+ cd address && $(GOTEST) $(COVER_FLAGS) ./... && sed -i.bak 's/v2\///g' coverage.txt
110116 cd btcec && $(GOTEST) $(COVER_FLAGS) ./... && sed -i.bak 's/v2\///g' coverage.txt
111- cd btcutil && $(GOTEST) $(COVER_FLAGS) ./...
112- cd btcutil/psbt && $(GOTEST) $(COVER_FLAGS) ./...
117+ cd btcutil && $(GOTEST) $(COVER_FLAGS) ./... && sed -i.bak 's/v2\///g' coverage.txt
118+ cd chaincfg && $(GOTEST) $(COVER_FLAGS) ./... && sed -i.bak 's/v2\///g' coverage.txt
119+ cd chainhash && $(GOTEST) $(COVER_FLAGS) ./... && sed -i.bak 's/v2\///g' coverage.txt
120+ cd txscript && $(GOTEST) $(COVER_FLAGS) ./... && sed -i.bak 's/v2\///g' coverage.txt
121+ cd psbt && $(GOTEST) $(COVER_FLAGS) ./... && sed -i.bak 's/v2\///g' coverage.txt
122+ cd wire && $(GOTEST) $(COVER_FLAGS) ./... && sed -i.bak 's/v2\///g' coverage.txt
113123
114124# ? unit-race: Run unit race tests
115125unit-race :
116126 @$(call print, "Running unit race tests.")
117127 env CGO_ENABLED=1 GORACE=" history_size=7 halt_on_errors=1" $(GOTEST ) -race -test.timeout=20m ./...
128+ cd address && env CGO_ENABLED=1 GORACE=" history_size=7 halt_on_errors=1" $(GOTEST ) -race -test.timeout=20m ./...
118129 cd btcec && env CGO_ENABLED=1 GORACE=" history_size=7 halt_on_errors=1" $(GOTEST ) -race -test.timeout=20m ./...
119130 cd btcutil && env CGO_ENABLED=1 GORACE=" history_size=7 halt_on_errors=1" $(GOTEST ) -race -test.timeout=20m ./...
120- cd btcutil/psbt && env CGO_ENABLED=1 GORACE=" history_size=7 halt_on_errors=1" $(GOTEST ) -race -test.timeout=20m ./...
131+ cd chaincfg && env CGO_ENABLED=1 GORACE=" history_size=7 halt_on_errors=1" $(GOTEST ) -race -test.timeout=20m ./...
132+ cd chainhash && env CGO_ENABLED=1 GORACE=" history_size=7 halt_on_errors=1" $(GOTEST ) -race -test.timeout=20m ./...
133+ cd txscript && env CGO_ENABLED=1 GORACE=" history_size=7 halt_on_errors=1" $(GOTEST ) -race -test.timeout=20m ./...
134+ cd psbt && env CGO_ENABLED=1 GORACE=" history_size=7 halt_on_errors=1" $(GOTEST ) -race -test.timeout=20m ./...
135+ cd wire && env CGO_ENABLED=1 GORACE=" history_size=7 halt_on_errors=1" $(GOTEST ) -race -test.timeout=20m ./...
121136
122137# =========
123138# UTILITIES
@@ -138,7 +153,8 @@ lint: $(LINT_BIN)
138153# ? clean: Clean source
139154clean :
140155 @$(call print, "Cleaning source.$(NC ) ")
141- rm -f coverage.txt btcec/coverage.txt btcutil/coverage.txt btcutil/psbt/coverage.txt
156+ find . -name coverage.txt | xargs $(RM )
157+ find . -name coverage.txt.bak | xargs $(RM )
142158
143159# ? tidy-module: Run 'go mod tidy' for all modules
144160tidy-module :
@@ -162,4 +178,4 @@ help: Makefile
162178 @echo " Choose a command run in btcd:"
163179 @sed -n ' s/^#?//p' $< | column -t -s ' :' | sort | sed -e ' s/^/ /'
164180
165- .PHONY : help
181+ .PHONY : help
0 commit comments