From 7ddebd7a7593a00b80757f3239f32099755405ca Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Sun, 21 Dec 2014 13:21:24 -0600 Subject: Exclude VM tests --- gocoverage.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gocoverage.sh') diff --git a/gocoverage.sh b/gocoverage.sh index 35038108b..12a4c93cc 100755 --- a/gocoverage.sh +++ b/gocoverage.sh @@ -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 - go test -covermode=count -coverprofile=$dir/profile.tmp $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 -- cgit v1.2.3 From 43bf3b4a783e53e5954d9aa19b1423dbfed85029 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Sun, 21 Dec 2014 14:46:32 -0600 Subject: Move goveralls call to script --- gocoverage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gocoverage.sh') diff --git a/gocoverage.sh b/gocoverage.sh index 12a4c93cc..24c8e9280 100755 --- a/gocoverage.sh +++ b/gocoverage.sh @@ -29,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 -- cgit v1.2.3 From aa5b29e2f291322991ceab231267d19b19af72a2 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 27 Jan 2015 16:19:21 +0100 Subject: Implemented contract ABI --- gocoverage.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gocoverage.sh') diff --git a/gocoverage.sh b/gocoverage.sh index 24c8e9280..f908a2d66 100755 --- a/gocoverage.sh +++ b/gocoverage.sh @@ -15,7 +15,7 @@ if ls $dir/*.go &> /dev/null; then # echo $dir if [[ $dir != "./tests/vm" ]] then - go test -covermode=count -coverprofile=$dir/profile.tmp $dir + $GOROOT/bin/go test -covermode=count -coverprofile=$dir/profile.tmp $dir fi if [ -f $dir/profile.tmp ] then @@ -25,7 +25,7 @@ if ls $dir/*.go &> /dev/null; then fi done -go tool cover -func profile.cov +$GOROOT/bin/go tool cover -func profile.cov # To submit the test coverage result to coveralls.io, # use goveralls (https://github.com/mattn/goveralls) -- cgit v1.2.3 From 57c6caf146a815f29b0698b8f67c827a254d7836 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Mon, 2 Feb 2015 12:14:04 -0600 Subject: Separate Coveralls submission from coverage script --- gocoverage.sh | 3 --- 1 file changed, 3 deletions(-) (limited to 'gocoverage.sh') diff --git a/gocoverage.sh b/gocoverage.sh index f908a2d66..5cb2fdf08 100755 --- a/gocoverage.sh +++ b/gocoverage.sh @@ -27,6 +27,3 @@ done $GOROOT/bin/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 -repotoken $COVERALLS_TOKEN -- cgit v1.2.3 From ae3e9d488136f3607f64b18dd81de5c9331f5440 Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Thu, 5 Feb 2015 16:02:15 -0600 Subject: Don't reference by $GOROOT --- gocoverage.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gocoverage.sh') diff --git a/gocoverage.sh b/gocoverage.sh index 5cb2fdf08..4245e3901 100755 --- a/gocoverage.sh +++ b/gocoverage.sh @@ -15,7 +15,7 @@ if ls $dir/*.go &> /dev/null; then # echo $dir if [[ $dir != "./tests/vm" ]] then - $GOROOT/bin/go test -covermode=count -coverprofile=$dir/profile.tmp $dir + go test -covermode=count -coverprofile=$dir/profile.tmp $dir fi if [ -f $dir/profile.tmp ] then @@ -25,5 +25,5 @@ if ls $dir/*.go &> /dev/null; then fi done -$GOROOT/bin/go tool cover -func profile.cov +go tool cover -func profile.cov -- cgit v1.2.3 From 66abe2e3d43c1004630c0c2f52a7f427bd51293b Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Fri, 20 Feb 2015 11:55:13 +0100 Subject: gocoverage.sh: skip . This is an attempt to get Travis working again. --- gocoverage.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gocoverage.sh') diff --git a/gocoverage.sh b/gocoverage.sh index 4245e3901..d353bd08a 100755 --- a/gocoverage.sh +++ b/gocoverage.sh @@ -13,7 +13,7 @@ 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" ]] + if [[ $dir != "./tests/vm" && $dir != "." ]] then go test -covermode=count -coverprofile=$dir/profile.tmp $dir fi -- cgit v1.2.3 From 654f7f707c9bd327fcbf0dcb89715a5930f915eb Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Fri, 20 Feb 2015 12:15:08 +0100 Subject: .travis.yml: speed up tests on Travis This should decrease test runtime to about 30 seconds. --- gocoverage.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'gocoverage.sh') diff --git a/gocoverage.sh b/gocoverage.sh index d353bd08a..e54a5cab0 100755 --- a/gocoverage.sh +++ b/gocoverage.sh @@ -1,11 +1,16 @@ #!/bin/bash -# The script does automatic checking on a Go package and its sub-packages, including: -# 6. test coverage (http://blog.golang.org/cover) set -e -# Run test coverage on each subdirectories and merge the coverage profile. +# Add godep workspace to GOPATH. We do it manually instead of using +# 'godep go test' or 'godep restore' so godep doesn't need to be installed. +GOPATH="$PWD/Godeps/_workspace:$GOPATH" + +# Install packages before testing. Not doing this would cause +# 'go test' to recompile all package dependencies before testing each package. +go install ./... +# Run test coverage on each subdirectories and merge the coverage profile. echo "mode: count" > profile.cov # Standard go tooling behavior is to ignore dirs with leading underscors -- cgit v1.2.3