harbor/Deploy/coverage4gotest.sh

13 lines
269 B
Bash
Raw Normal View History

#!/bin/bash
2016-08-16 07:45:59 +02:00
set -e
echo "mode: set" >>profile.cov
for dir in $(go list ./... | grep -v -E 'vendor|tests')
do
go test -cover -coverprofile=profile.tmp $dir
if [ -f profile.tmp ]
then
cat profile.tmp | tail -n +2 >> profile.cov
rm profile.tmp
fi
done