tendermint/libs/test.sh

16 lines
316 B
Bash
Raw Normal View History

2017-10-24 23:30:05 +04:00
#!/usr/bin/env bash
set -e
2017-11-29 03:05:20 +00:00
# run the linter
# make lint
2017-11-29 03:05:20 +00:00
# run the unit tests with coverage
echo "" > coverage.txt
2017-10-24 23:30:05 +04:00
for d in $(go list ./... | grep -v vendor); do
2017-12-29 10:42:02 -05:00
go test -race -coverprofile=profile.out -covermode=atomic "$d"
if [ -f profile.out ]; then
cat profile.out >> coverage.txt
rm profile.out
fi
2017-10-24 23:30:05 +04:00
done