1
0
镜像自地址 https://github.com/tuna/tunasync.git 已同步 2025-12-06 06:26:46 +00:00

chore: travis CI and coverall integration

这个提交包含在:
bigeagle
2016-04-10 22:40:48 +08:00
父节点 ed896b16c1
当前提交 66df20cb1d
共有 4 个文件被更改,包括 54 次插入4 次删除

31
.testandcover.bash 可执行文件
查看文件

@@ -0,0 +1,31 @@
#!/bin/bash
function die() {
echo $*
exit 1
}
export GOPATH=`pwd`:$GOPATH
# Initialize profile.cov
echo "mode: count" > profile.cov
# Initialize error tracking
ERROR=""
# Test each package and append coverage profile info to profile.cov
for pkg in `cat .testpackages.txt`
do
#$HOME/gopath/bin/
go test -v -covermode=count -coverprofile=profile_tmp.cov $pkg || ERROR="Error testing $pkg"
[ -f profile_tmp.cov ] && {
tail -n +2 profile_tmp.cov >> profile.cov || die "Unable to append coverage for $pkg"
}
done
if [ ! -z "$ERROR" ]
then
die "Encountered error, last error was: $ERROR"
fi