From cfc7dc243cee56b830fbb0811afc9793c088fa95 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Tue, 8 Nov 2016 14:10:52 -0800 Subject: [PATCH] Add script for coveralls --- .gitignore | 1 + tests.sh | 9 +++++++++ 2 files changed, 10 insertions(+) create mode 100755 tests.sh diff --git a/.gitignore b/.gitignore index 5c9955e..52c205c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ go-ricochet-coverage.out *~ +*.out diff --git a/tests.sh b/tests.sh new file mode 100755 index 0000000..58ceb39 --- /dev/null +++ b/tests.sh @@ -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