Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
cc87551e
Commit
cc87551e
authored
Aug 18, 2015
by
Taylor Gerring
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Codecov integration
parent
d0dc1b4a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
24 deletions
+13
-24
.travis.yml
.travis.yml
+2
-2
test-global-coverage.sh
build/test-global-coverage.sh
+11
-22
No files found.
.travis.yml
View file @
cc87551e
...
...
@@ -5,7 +5,7 @@ install:
# - go get code.google.com/p/go.tools/cmd/goimports
# - go get github.com/golang/lint/golint
# - go get golang.org/x/tools/cmd/vet
-
go get golang.org/x/tools/cmd/cover
github.com/mattn/goveralls
-
go get golang.org/x/tools/cmd/cover
before_script
:
# - gofmt -l -w .
# - goimports -l -w .
...
...
@@ -15,7 +15,7 @@ before_script:
script
:
-
make travis-test-with-coverage
after_success
:
-
if [ "$COVERALLS_TOKEN" ]; then goveralls -coverprofile=profile.cov -service=travis-ci -repotoken $COVERALLS_TOKEN; fi
-
bash <(curl -s https://codecov.io/bash)
env
:
global
:
-
secure
:
"
U2U1AmkU4NJBgKR/uUAebQY87cNL0+1JHjnLOmmXwxYYyj5ralWb1aSuSH3qSXiT93qLBmtaUkuv9fberHVqrbAeVlztVdUsKAq7JMQH+M99iFkC9UiRMqHmtjWJ0ok4COD1sRYixxi21wb/JrMe3M1iL4QJVS61iltjHhVdM64="
...
...
build/test-global-coverage.sh
View file @
cc87551e
#!/bin/bash
# This script runs all package tests and merges the resulting coverage
# profiles. Coverage is accounted per package under test.
#!/usr/bin/env bash
set
-e
if
[
!
-f
"build/env.sh"
]
;
then
echo
"
$0
must be run from the root of the repository."
exit
2
fi
echo
"mode: count"
>
profile.cov
for
pkg
in
$(
go list ./...
)
;
do
# drop the namespace prefix.
dir
=
${
pkg
##github.com/ethereum/go-ethereum/
}
if
[[
$dir
!=
"tests"
]]
;
then
go
test
-covermode
=
count
-coverprofile
=
$dir
/profile.tmp
$pkg
fi
if
[[
-f
$dir
/profile.tmp
]]
;
then
tail
-n
+2
$dir
/profile.tmp
>>
profile.cov
rm
$dir
/profile.tmp
echo
""
>
coverage.txt
for
d
in
$(
find ./
*
-maxdepth
10
-type
d
-not
-path
"./build"
-not
-path
"./Godeps/*"
)
;
do
if
ls
$d
/
*
.go &> /dev/null
;
then
go
test
-coverprofile
=
profile.out
-covermode
=
atomic
$d
if
[
-f
profile.out
]
;
then
cat
profile.out
>>
coverage.txt
echo
'<<<<<< EOF'
>>
coverage.txt
rm
profile.out
fi
fi
done
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