gin/coverage.sh
田欧 737d2fb7ab add grpc example (#1401)
use grpc helloworld example.
2018-06-22 09:51:06 +08:00

14 lines
335 B
Bash

#!/usr/bin/env bash
set -e
echo "mode: count" > coverage.out
for d in $(go list ./... | grep -E 'gin$|binding$|render$' | grep -v 'examples'); do
go test -v -covermode=count -coverprofile=profile.out $d
if [ -f profile.out ]; then
cat profile.out | grep -v "mode:" >> coverage.out
rm profile.out
fi
done