Skip to content

Commit

Permalink
Simplified gen-coverage.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
come-maiz committed Oct 30, 2015
1 parent cfa9e6d commit d0ccbcc
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions gen-coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,8 @@

set -e

go get github.com/axw/gocov/gocov
go get gopkg.in/matm/v1/gocov-html
./run-checks --unit

# pass alternative output dir in $1
OUTPUTDIR=${1:-$(pwd)}
go tool cover -html=.coverage/coverage.out -o .coverage/coverage.html

for d in pkg/snapfs pkg/clickdeb snappy partition logger helpers coreconfig priv release oauth; do
(cd $d &&
$GOPATH/bin/gocov test | $GOPATH/bin/gocov-html > $OUTPUTDIR/cov-$(echo $d|sed -r 's#/#_#').html)
done

echo "Coverage html reports are available in $OUTPUTDIR"
echo "Coverage html reports are available in .coverage/coverage.html"

0 comments on commit d0ccbcc

Please sign in to comment.