Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
2fc9cc54
Unverified
Commit
2fc9cc54
authored
Dec 06, 2016
by
Jakub Sztandera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some progress with coverage
License: MIT Signed-off-by:
Jakub Sztandera
<
kubuxu@protonmail.ch
>
parent
bae44ade
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
16 deletions
+12
-16
Makefile
Makefile
+12
-16
No files found.
Makefile
View file @
2fc9cc54
...
...
@@ -15,14 +15,6 @@ export GOTFLAGS
GOFLAGS
+=
-tags
$(
call
join-with,
$(comma)
,
$(GOTAGS)
)
ifneq
($(COVERALLS_TOKEN), )
covertools_rule
=
covertools
GOT
=
overalls
-project
=
github.com/ipfs/go-ipfs
-covermode
atomic
-ignore
=
.git,Godeps,thirdparty,test,core/commands,cmd
--
$(GOFLAGS)
$(GOTFLAGS)
else
covertools_rule
=
GOT
=
go
test
$(GOFLAGS)
$(GOTFLAGS)
./...
endif
ifeq
($(TEST_NO_FUSE),1)
GOTAGS
+=
nofuse
endif
...
...
@@ -76,10 +68,9 @@ path_check:
deps
:
go_check gx_check path_check $(covertools_rule)
${gx_bin}
--verbose
install
--global
>
/dev/null 2>&1
covertools
:
go get
-u
github.com/
mattn/goveralls
deps_
covertools
:
go get
-u
github.com/
wadey/gocovmerge
go get
-u
golang.org/x/tools/cmd/cover
go get
-u
github.com/Kubuxu/overalls
# saves/vendors third-party dependencies to Godeps/_workspace
# -r flag rewrites import paths to use the vendored path
...
...
@@ -119,14 +110,19 @@ test_3node:
test_go_fmt
:
bin/test-go-fmt
test_go_short
:
GOTFLAGS += -test.short
test_go_race
:
GOTFLAGS += -race
test_go_expensive test_go_short test_go_race
:
$(GOT)
ifneq
($(COVERALLS_TOKEN), )
goveralls
-coverprofile
=
overalls.coverprofile
-service
$(SERVICE)
endif
go
test
$(GOFLAGS)
$(GOTFLAGS)
./...
coverage
:
deps_covertools
@
echo
Running coverage
$(
eval
PKGS :
=
$(
shell
go list
-f
'{{if (len .GoFiles
)}}
{{.ImportPath}}{{end}}'
./... |
grep
-v
/vendor/ |
grep
-v
/Godeps/
))
#$(eval PKGS_DELIM := $(call join-with,$(comma),$(PKGS)))
@go list -f '{{if or (len .TestGoFiles) (len .XTestGoFiles)}}go test $(GOFLAGS) $(GOTFLAGS) -covermode=atomic -coverprofile={{.Name}}_{{len .Imports}}_{{len .Deps}}.coverprofile {{.ImportPath}}{{end}}' $(GOFLAGS) $(PKGS) | xargs -I {} bash -c {} 2>&1 | grep -v 'warning
:
no packages being tested depend on'
gocovmerge
`
ls
*
.coverprofile
`
>
coverage.txt
rm
*
.coverprofile
bash
-c
'bash <(curl -s https://codecov.io/bash)'
test_sharness_short
:
$(MAKE)
-j1
-C
test
/sharness/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment