mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 18:20:27 +00:00
24 lines
552 B
Bash
Executable File
24 lines
552 B
Bash
Executable File
#!/bin/sh
|
|
|
|
echo "mode: count" > profile.cov
|
|
fail=0
|
|
for dir in $(find . -type f -name '*_test.go' | grep -v '^./experimental/' | grep -v '^./releases/' | xargs -n1 dirname | sort -u); do
|
|
go get -t $dir
|
|
|
|
if ! errcheck -ignore 'Close' $dir ; then
|
|
fail=1
|
|
fi
|
|
|
|
output=$(mktemp cover.XXXXXXXXXX)
|
|
if ! go test -race -tags netgo -covermode=atomic -coverprofile=$output $dir ; then
|
|
fail=1
|
|
fi
|
|
|
|
if [ -f $output ]; then
|
|
tail -n +2 <$output >>profile.cov
|
|
rm $output
|
|
fi
|
|
done
|
|
go tool cover -html=profile.cov -o=coverage.html
|
|
exit $fail
|