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 From d8f7cb2f55e7e8cf1c831b65e8962bb0bdd2599e Mon Sep 17 00:00:00 2001 From: Taylor Gerring Date: Sat, 21 Feb 2015 13:48:09 +0100 Subject: Don't print per-function testing results --- gocoverage.sh | 3 --- 1 file changed, 3 deletions(-) (limited to 'gocoverage.sh') diff --git a/gocoverage.sh b/gocoverage.sh index e54a5cab0..5479d8d3b 100755 --- a/gocoverage.sh +++ b/gocoverage.sh @@ -29,6 +29,3 @@ if ls $dir/*.go &> /dev/null; then fi fi done - -go tool cover -func profile.cov - -- cgit v1.2.3