2013-05-08 21:31:00 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# This script uses gocov to generate a test coverage report.
|
|
|
|
# The gocov tool my be obtained with the following command:
|
|
|
|
# go get github.com/awx/gocov/gocov
|
|
|
|
#
|
2013-05-10 17:31:39 +02:00
|
|
|
# It will be installed to $GOPATH/bin, so ensure that location is in your $PATH.
|
2013-05-08 21:31:00 +02:00
|
|
|
|
|
|
|
# Check for gocov.
|
|
|
|
type gocov >/dev/null 2>&1
|
|
|
|
if [ $? -ne 0 ]; then
|
|
|
|
echo >&2 "This script requires the gocov tool."
|
|
|
|
echo >&2 "You may obtain it with the following command:"
|
2013-05-09 20:19:09 +02:00
|
|
|
echo >&2 "go get github.com/axw/gocov/gocov"
|
2013-05-08 21:31:00 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
gocov test | gocov report
|