diff options
author | Felix Lange <fjl@twurst.com> | 2015-04-29 07:27:47 +0800 |
---|---|---|
committer | Felix Lange <fjl@twurst.com> | 2015-04-29 08:13:37 +0800 |
commit | aa03e53ca8d55e74e562f5f56d90e4fd2579fb4e (patch) | |
tree | f9aa18e2bc9b27d26767d4a6bbb33426b4c67bc5 /build | |
parent | c6b983e449ec97d902f263cd693cf615b790542a (diff) | |
download | go-tangerine-aa03e53ca8d55e74e562f5f56d90e4fd2579fb4e.tar go-tangerine-aa03e53ca8d55e74e562f5f56d90e4fd2579fb4e.tar.gz go-tangerine-aa03e53ca8d55e74e562f5f56d90e4fd2579fb4e.tar.bz2 go-tangerine-aa03e53ca8d55e74e562f5f56d90e4fd2579fb4e.tar.lz go-tangerine-aa03e53ca8d55e74e562f5f56d90e4fd2579fb4e.tar.xz go-tangerine-aa03e53ca8d55e74e562f5f56d90e4fd2579fb4e.tar.zst go-tangerine-aa03e53ca8d55e74e562f5f56d90e4fd2579fb4e.zip |
Use Makefile for Travis tests
Diffstat (limited to 'build')
-rwxr-xr-x | build/test-global-coverage.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/build/test-global-coverage.sh b/build/test-global-coverage.sh new file mode 100755 index 000000000..417c829f4 --- /dev/null +++ b/build/test-global-coverage.sh @@ -0,0 +1,26 @@ +#!/bin/bash + +# This script runs all package tests and merges the resulting coverage +# profiles. Coverage is accounted per package under test. + +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/vm" ]]; 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 + fi +done |