Skip to content

Commit

Permalink
FAB-1015 code coverage report for fabric-cop repository
Browse files Browse the repository at this point in the history
This patch set enables feature to generate code coverage report
in Jenkins for every patch set created and merged. After patch/merge
request is successfully executed in jenkins, cobertura generates a
code coverage report and display the results in Jenkins dashboard.

https://jira.hyperledger.org/browse/FAB-101

Change-Id: I390f5aed599cdfa28d1e58ca0817710ed539bb83
Signed-off-by: rameshbabu <[email protected]>
  • Loading branch information
rameshthoomu committed Nov 16, 2016
1 parent 33fa279 commit 9ccf04a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ bin
cli/cop/cop
*.csr
*.der
coverage.xml
6 changes: 5 additions & 1 deletion scripts/run_tests
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@

echo "Running all tests ..."
{

go get github.com/axw/gocov/...
go get github.com/AlekSi/gocov-xml

for file in `find . | egrep -v "vendor|.git|bin|scripts|testdata|idp"`
do
if [ -d $file ]; then
go test $file -cover
gocov test $file | gocov-xml > coverage.xml
fi
done
} | tee /tmp/test.results
Expand Down

0 comments on commit 9ccf04a

Please sign in to comment.