blob: 9579497e4115f7e90e1adf99417ddb65d113e532 [file] [log] [blame]
# This script uses gocov to generate a test coverage report.
# The gocov tool my be obtained with the following command:
# go get
# It will be installed to $GOPATH/bin, so ensure that location is in your $PATH.
# Check for gocov.
if ! type gocov >/dev/null 2>&1; then
echo >&2 "This script requires the gocov tool."
echo >&2 "You may obtain it with the following command:"
echo >&2 "go get"
exit 1
# Only run the cgo tests if gcc is installed.
if type gcc >/dev/null 2>&1; then
(cd spew && gocov test -tags testcgo | gocov report)
(cd spew && gocov test | gocov report)