File tree 5 files changed +37
-36
lines changed
5 files changed +37
-36
lines changed Original file line number Diff line number Diff line change @@ -30,3 +30,7 @@ deploy/osx/Mist\ Installer.dmg
30
30
/build /_workspace /
31
31
/build /bin /
32
32
33
+ # travis
34
+ profile.tmp
35
+ profile.cov
36
+
Original file line number Diff line number Diff line change 4
4
before_install :
5
5
- sudo add-apt-repository ppa:beineri/opt-qt541 -y
6
6
- sudo apt-get update -qq
7
- - sudo apt-get install -yqq libgmp3-dev libreadline6-dev qt54quickcontrols qt54webengine
7
+ - sudo apt-get install -yqq libgmp3-dev qt54quickcontrols qt54webengine
8
8
install :
9
9
# - go get code.google.com/p/go.tools/cmd/goimports
10
10
# - go get github.com/golang/lint/golint
11
11
# - go get golang.org/x/tools/cmd/vet
12
- - go get golang.org/x/tools/cmd/cover
13
- - go get github.com/mattn/goveralls
12
+ - go get golang.org/x/tools/cmd/cover github.com/mattn/goveralls
14
13
before_script :
15
14
# - gofmt -l -w .
16
15
# - goimports -l -w .
17
16
# - golint .
18
17
# - go vet ./...
19
18
# - go test -race ./...
20
19
script :
21
- - ./gocoverage.sh
20
+ - make travis-test-with-coverage
22
21
after_success :
23
22
- if [ "$COVERALLS_TOKEN" ]; then goveralls -coverprofile=profile.cov -service=travis-ci -repotoken $COVERALLS_TOKEN; fi
24
23
env :
Original file line number Diff line number Diff line change 2
2
# with Go source code. If you know what GOPATH is then you probably
3
3
# don't need to bother with make.
4
4
5
- .PHONY : geth mist test clean
5
+ .PHONY : geth mist all test travis-test-with-coverage clean
6
6
GOBIN = build/bin
7
7
8
8
geth :
21
21
test : all
22
22
build/env.sh go test ./...
23
23
24
+ travis-test-with-coverage : all
25
+ build/env.sh build/test-global-coverage.sh
26
+
24
27
clean :
25
28
rm -fr build/_workspace/pkg/ Godeps/_workspace/pkg $(GOBIN ) /*
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # This script runs all package tests and merges the resulting coverage
4
+ # profiles. Coverage is accounted per package under test.
5
+
6
+ set -e
7
+
8
+ if [ ! -f " build/env.sh" ]; then
9
+ echo " $0 must be run from the root of the repository."
10
+ exit 2
11
+ fi
12
+
13
+ echo " mode: count" > profile.cov
14
+
15
+ for pkg in $( go list ./...) ; do
16
+ # drop the namespace prefix.
17
+ dir=${pkg## github.com/ ethereum/ go-ethereum/ }
18
+
19
+ if [[ $dir != " tests/vm" ]]; then
20
+ go test -covermode=count -coverprofile=$dir /profile.tmp $pkg
21
+ fi
22
+ if [[ -f $dir /profile.tmp ]]; then
23
+ tail -n +2 $dir /profile.tmp >> profile.cov
24
+ rm $dir /profile.tmp
25
+ fi
26
+ done
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments