Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
whqwjb
go-ethereum
提交
0737cbc5
G
go-ethereum
项目概览
whqwjb
/
go-ethereum
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
go-ethereum
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
0737cbc5
编写于
8月 18, 2015
作者:
J
Jeffrey Wilcke
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1683 from ethereum/travis
Switch from Coveralls to Codecov code coverage service
上级
227ff4d2
cc87551e
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
24 deletion
+13
-24
.travis.yml
.travis.yml
+2
-2
build/test-global-coverage.sh
build/test-global-coverage.sh
+11
-22
未找到文件。
.travis.yml
浏览文件 @
0737cbc5
...
...
@@ -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
浏览文件 @
0737cbc5
#!/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
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录