File: cov.sh

package info (click to toggle)
golang-github-nats-io-go-nats-streaming 0.4.0%2Bgit20181116.19c9df8-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 328 kB
  • sloc: sh: 11; makefile: 4
file content (16 lines) | stat: -rwxr-xr-x 422 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash -e
# Run from directory above via ./scripts/cov.sh

rm -rf ./cov
mkdir cov
go test -v -covermode=atomic -coverprofile=./cov/stan.out
gocovmerge ./cov/*.out > acc.out
rm -rf ./cov

# If we have an arg, assume travis run and push to coveralls. Otherwise launch browser results
if [[ -n $1 ]]; then
    $HOME/gopath/bin/goveralls -coverprofile=acc.out
    rm -rf ./acc.out
else
    go tool cover -html=acc.out
fi