Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 18 lines (14 sloc) 346 Bytes
#!/bin/bash
set -e
cmd=${*-test}
( cd dlock; protoc --go_out=./ *.proto )
if [[ "$cmd" == "test" ]] ; then
rm -f coverage.txt
for d in $(go list ./... |fgrep -v vendor) ; do
tmp=/tmp/coverage-one.txt
go test -race -coverprofile=$tmp -covermode=atomic $d
[[ -f "$tmp" ]] && cat $tmp >>coverage.txt
done
else
go $cmd ./...
fi