Merge pull request #217 from ethereum/tests

Updated code coverage support & cleanup
This commit is contained in:
Jeffrey Wilcke 2014-12-22 11:42:28 +01:00
commit e531c6fc6c
6 changed files with 13 additions and 3055 deletions

View File

@ -1,6 +1,6 @@
language: go
go:
- 1.3
- tip
before_install:
- sudo add-apt-repository ppa:ubuntu-sdk-team/ppa -y
- sudo apt-get update -qq
@ -8,10 +8,10 @@ before_install:
install:
- go get code.google.com/p/go.tools/cmd/goimports
- go get github.com/golang/lint/golint
# - go get code.google.com/p/go.tools/cmd/vet
- go get code.google.com/p/go.tools/cmd/cover
# - go get golang.org/x/tools/cmd/vet
- if ! go get code.google.com/p/go.tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
- go get github.com/mattn/goveralls
- ./install_deps.sh
- ETH_DEPS=$(go list -f '{{.Imports}} {{.TestImports}} {{.XTestImports}}' github.com/ethereum/go-ethereum/... | sed -e 's/\[//g' | sed -e 's/\]//g' | sed -e 's/C //g'); if [ "$ETH_DEPS" ]; then go get $ETH_DEPS; fi
before_script:
- gofmt -l -w .
- goimports -l -w .
@ -19,7 +19,7 @@ before_script:
# - go vet ./...
# - go test -race ./...
script:
- ./gocoverage.sh && goveralls -coverprofile=profile.cov -service=travis-ci -repotoken $COVERALLS_TOKEN
- ./gocoverage.sh
env:
- secure: "U2U1AmkU4NJBgKR/uUAebQY87cNL0+1JHjnLOmmXwxYYyj5ralWb1aSuSH3qSXiT93qLBmtaUkuv9fberHVqrbAeVlztVdUsKAq7JMQH+M99iFkC9UiRMqHmtjWJ0ok4COD1sRYixxi21wb/JrMe3M1iL4QJVS61iltjHhVdM64="

View File

@ -25,14 +25,14 @@ RUN apt-get install -y qtbase5-private-dev qtdeclarative5-private-dev libqt5open
## Fetch and install serpent-go
RUN go get -v -d github.com/ethereum/serpent-go
WORKDIR $GOPATH/src/github.com/ethereum/serpent-go
RUN git checkout master
# RUN git checkout master
RUN git submodule update --init
RUN go install -v
# Fetch and install go-ethereum
RUN go get -v -d github.com/ethereum/go-ethereum/...
WORKDIR $GOPATH/src/github.com/ethereum/go-ethereum
RUN git checkout poc8
# RUN git checkout develop
RUN ETH_DEPS=$(go list -f '{{.Imports}} {{.TestImports}} {{.XTestImports}}' github.com/ethereum/go-ethereum/... | sed -e 's/\[//g' | sed -e 's/\]//g' | sed -e 's/C //g'); if [ "$ETH_DEPS" ]; then go get $ETH_DEPS; fi
RUN go install -v ./cmd/ethereum

View File

@ -9,6 +9,7 @@ Ethereum
[![Build
Status](http://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20master%20branch)](http://build.ethdev.com:8010/builders/Linux%20Go%20master%20branch/builds/-1) master [![Build
Status](http://build.ethdev.com/buildstatusimage?builder=Linux%20Go%20develop%20branch)](http://build.ethdev.com:8010/builders/Linux%20Go%20develop%20branch/builds/-1) develop
[![Coverage Status](https://coveralls.io/repos/ethereum/go-ethereum/badge.png?branch=tests)](https://coveralls.io/r/ethereum/go-ethereum?branch=tests) tests
Ethereum Go Client © 2014 Jeffrey Wilcke.

View File

@ -13,7 +13,10 @@ for dir in $(find . -maxdepth 10 -not -path './.git*' -not -path '*/_*' -type d)
do
if ls $dir/*.go &> /dev/null; then
# echo $dir
if [[ $dir != "./tests/vm" ]]
then
go test -covermode=count -coverprofile=$dir/profile.tmp $dir
fi
if [ -f $dir/profile.tmp ]
then
cat $dir/profile.tmp | tail -n +2 >> profile.cov
@ -26,4 +29,4 @@ go tool cover -func profile.cov
# To submit the test coverage result to coveralls.io,
# use goveralls (https://github.com/mattn/goveralls)
# goveralls -coverprofile=profile.cov -service=travis-ci
goveralls -coverprofile=profile.cov -service=travis-ci -repotoken $COVERALLS_TOKEN

View File

@ -1,8 +0,0 @@
#!/bin/bash
set -e
TEST_DEPS=$(go list -f '{{.Imports}} {{.TestImports}} {{.XTestImports}}' github.com/ethereum/go-ethereum/... | sed -e 's/\[//g' | sed -e 's/\]//g' | sed -e 's/C //g')
if [ "$TEST_DEPS" ]; then
go get -race $TEST_DEPS
fi

File diff suppressed because it is too large Load Diff