mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-08 02:31:19 +00:00
a41e372b39
Former-commit-id: fa0dc873367b92a06b10fd989e3fec960c03065a [formerly e98efffa565ea6aa3eadeb19c2f9a66a56eb5ddd] Former-commit-id: ce6e4f01d12015e67a51aa7d928a6ab8e8eedeee
23 lines
658 B
Bash
23 lines
658 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.
|
|
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 github.com/axw/gocov/gocov"
|
|
exit 1
|
|
fi
|
|
|
|
# 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)
|
|
else
|
|
(cd spew && gocov test | gocov report)
|
|
fi
|