Skip to content

Commit 22d03f0

Browse files
committed
Fixed cover profile generation
1 parent 179a16f commit 22d03f0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Makefile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,11 @@ install: $(INSTALL_LIST)
4949
test: $(TEST_LIST)
5050
iref: $(IREF_LIST)
5151
fmt: $(FMT_LIST)
52+
53+
noop =
54+
comma = ,
55+
space = $(noop) $(noop)
56+
5257
cover:
5358
rm -f profile.out
5459
$(MAKE) $(COVER_LIST)
@@ -77,7 +82,8 @@ $(IREF_LIST): %_iref: pkg/scwversion/version.go
7782
$(TEST_LIST): %_test:
7883
$(GOTEST) ./$*
7984
$(COVER_LIST): %_cover:
80-
$(GOTEST) -covermode=count -v -coverprofile=file-profile.out ./$*
85+
#$(GOTEST) -covermode=set -coverpkg=$(subst $(space),$(comma),$(addprefix ./, $(PACKAGES))) -v -coverprofile=file-profile.out ./$*
86+
$(GOTEST) -covermode=set -v -coverprofile=file-profile.out ./$*
8187
if [ -f file-profile.out ]; then cat file-profile.out | grep -v "mode: set" >> profile.out || true; rm -f file-profile.out; fi
8288
$(FMT_LIST): %_fmt:
8389
$(GOFMT) ./$*

0 commit comments

Comments
 (0)