btcd/cov_report.sh
Dave Collins c97c8f17a4 Add test coverage report and generate script.
Both of these items were referenced in the README.md, but were not
in the repository.
2013-05-29 16:20:06 -05:00

18 lines
528 B
Bash

#!/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/axw/gocov/gocov
#
# It will be installed to $GOPATH/bin, so ensure that location is in your $PATH.
# 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:"
echo >&2 "go get github.com/axw/gocov/gocov"
exit 1
fi
(cd sqlite3 && gocov test | gocov report)