tendermint/libs/test.sh

22 lines
391 B
Bash
Raw Permalink 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
2017-12-29 10:42:02 -05:00
# make metalinter_test
2017-11-29 03:05:20 +00:00
2018-05-07 23:23:15 +02:00
# setup certs
make gen_certs
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
2018-05-07 23:23:15 +02:00
# cleanup certs
make clean_certs