Add script for coveralls

This commit is contained in:
Sarah Jamie Lewis 2016-11-08 14:10:52 -08:00
parent a7c8ec5b0e
commit cfc7dc243c
2 changed files with 10 additions and 0 deletions

1
.gitignore vendored
View File

@ -1,2 +1,3 @@
go-ricochet-coverage.out go-ricochet-coverage.out
*~ *~
*.out

9
tests.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
set -e
pwd
go test -coverprofile=cover.out -v .
go test -coverprofile=utils.cover.out -v ./utils
echo "mode: set" > coverage.out && cat *.cover.out | grep -v mode: | sort -r | \
awk '{if($1 != last) {print $0;last=$1}}' >> coverage.out
rm -rf *.cover.out