Skip to content

Commit 3df743a

Browse files
committed
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.
1 parent a6c1598 commit 3df743a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

coverage/Rules.mk

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ endif
1313
.PHONY: $(d)/coverage_deps
1414

1515
# 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)
1817

1918
UCOVER_$(d) := $(addsuffix .coverprofile,$(addprefix $(d)/unitcover/, $(subst /,_,$(UTESTS_$(d)))))
2019

0 commit comments

Comments
 (0)