good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
aa03e53c
Commit
aa03e53c
authored
9 years ago
by
Felix Lange
Browse files
Options
Downloads
Patches
Plain Diff
Use Makefile for Travis tests
parent
c6b983e4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.gitignore
+4
-0
4 additions, 0 deletions
.gitignore
.travis.yml
+3
-4
3 additions, 4 deletions
.travis.yml
Makefile
+4
-1
4 additions, 1 deletion
Makefile
build/test-global-coverage.sh
+26
-0
26 additions, 0 deletions
build/test-global-coverage.sh
gocoverage.sh
+0
-31
0 additions, 31 deletions
gocoverage.sh
with
37 additions
and
36 deletions
.gitignore
+
4
−
0
View file @
aa03e53c
...
...
@@ -30,3 +30,7 @@ deploy/osx/Mist\ Installer.dmg
/build/_workspace/
/build/bin/
# travis
profile.tmp
profile.cov
This diff is collapsed.
Click to expand it.
.travis.yml
+
3
−
4
View file @
aa03e53c
...
...
@@ -4,13 +4,12 @@ go:
before_install
:
-
sudo add-apt-repository ppa:beineri/opt-qt541 -y
-
sudo apt-get update -qq
-
sudo apt-get install -yqq libgmp3-dev
libreadline6-dev
qt54quickcontrols qt54webengine
-
sudo apt-get install -yqq libgmp3-dev qt54quickcontrols qt54webengine
install
:
# - go get code.google.com/p/go.tools/cmd/goimports
# - go get github.com/golang/lint/golint
# - go get golang.org/x/tools/cmd/vet
-
go get golang.org/x/tools/cmd/cover
-
go get github.com/mattn/goveralls
-
go get golang.org/x/tools/cmd/cover github.com/mattn/goveralls
before_script
:
# - gofmt -l -w .
# - goimports -l -w .
...
...
@@ -18,7 +17,7 @@ before_script:
# - go vet ./...
# - go test -race ./...
script
:
-
./go
coverage
.sh
-
make travis-test-with-
coverage
after_success
:
-
if [ "$COVERALLS_TOKEN" ]; then goveralls -coverprofile=profile.cov -service=travis-ci -repotoken $COVERALLS_TOKEN; fi
env
:
...
...
This diff is collapsed.
Click to expand it.
Makefile
+
4
−
1
View file @
aa03e53c
...
...
@@ -2,7 +2,7 @@
# with Go source code. If you know what GOPATH is then you probably
# don't need to bother with make.
.PHONY
:
geth mist
test
clean
.PHONY
:
geth mist
all test travis-test-with-coverage
clean
GOBIN
=
build/bin
geth
:
...
...
@@ -21,5 +21,8 @@ all:
test
:
all
build/env.sh go
test
./...
travis-test-with-coverage
:
all
build/env.sh build/test-global-coverage.sh
clean
:
rm
-fr
build/_workspace/pkg/ Godeps/_workspace/pkg
$(
GOBIN
)
/
*
This diff is collapsed.
Click to expand it.
build/test-global-coverage.sh
0 → 100755
+
26
−
0
View file @
aa03e53c
#!/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
This diff is collapsed.
Click to expand it.
gocoverage.sh
deleted
100755 → 0
+
0
−
31
View file @
c6b983e4
#!/bin/bash
set
-e
# 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
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"
&&
$dir
!=
"."
]]
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
rm
$dir
/profile.tmp
fi
fi
done
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment