@cryptotaxi247 / kubo / commits / 3df743ac2

fix error when computing coverage

Some packages can contain both external and internal tests. Listing these packages twice causes us to create two targets (which fails). Instead, use a single go list statement.

Steven Allen committed Oct 12, 2020 at 16:35 UTC 3df743ac2976d3a2c9aa5109647fd593b5d325be
1 file changed +1 -2
coverage/Rules.mk
+1 -2
@@ -13,8 +13,7 @@ endif
13 .PHONY: $(d)/coverage_deps
14
15 # unit tests coverage
16 -UTESTS_$(d) := $(shell $(GOCC) list -f '{{if (len .TestGoFiles)}}{{.ImportPath}}{{end}}' $(go-flags-with-tags) ./...)
17 -UTESTS_$(d) += $(shell $(GOCC) list -f '{{if (len .XTestGoFiles)}}{{.ImportPath}}{{end}}' $(go-flags-with-tags) ./... | grep -v go-ipfs/vendor | grep -v go-ipfs/Godeps)
16 +UTESTS_$(d) := $(shell $(GOCC) list -f '{{if (or (len .TestGoFiles) (len .XTestGoFiles))}}{{.ImportPath}}{{end}}' $(go-flags-with-tags) ./... | grep -v go-ipfs/vendor | grep -v go-ipfs/Godeps)
17
18 UCOVER_$(d) := $(addsuffix .coverprofile,$(addprefix $(d)/unitcover/, $(subst /,_,$(UTESTS_$(d)))))
19