Skip to content

Commit

Permalink
Merge "fix code coverage report issue"
Browse files Browse the repository at this point in the history
  • Loading branch information
mastersingh24 authored and Gerrit Code Review committed Nov 24, 2016
2 parents 1114d56 + 66cd46d commit 299c796
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@
# - all (default) - builds all targets and runs all tests
# - license - check all go files for license headers
# - cop - builds the cop executable
# - tests - runs all the cop tests
# - unit-tests - runs the go-test based unit tests
# - unit-tests - Performs checks first and runs the go-test based unit tests
# - checks - runs all check conditions (license, format, imports, lint and vet)

all: license vet lint format imports cop tests unit-tests
all: checks cop unit-tests

checks: license vet lint format imports

license: .FORCE
@scripts/check_license
Expand All @@ -46,9 +48,7 @@ cop:
@mkdir -p bin && cd cli && go build -o ../bin/cop
@echo "Built bin/cop"

tests: cop unit-tests

unit-tests: cop
unit-tests: checks cop
@scripts/run_tests

.FORCE:
9 changes: 3 additions & 6 deletions scripts/run_tests
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,9 @@ export PATH=$PATH:$GOPATH/bin
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
gocov test $file | gocov-xml > coverage.xml
fi
done
PKGS=`go list github.com/hyperledger/fabric-cop/... | grep -v /vendor/`

gocov test $PKGS | gocov-xml > coverage.xml
} | tee /tmp/test.results
echo "Finished running all tests"
SC=0
Expand Down

0 comments on commit 299c796

Please sign in to comment.