Code coverage for smoke tests.

Allow non-circle people to build coverage reports.
This commit is contained in:
Tom Wilkie committed 2015-07-10 14:45:14 +00:00
1 parent da41604229
commit 00a7490a1d
12 files changed
+211 -14

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
#!/bin/bash
set -eux
if [ -n "$CIRCLECI" ]; then
for i in $(seq 1 $(($CIRCLE_NODE_TOTAL - 1))); do
scp node$i:/home/ubuntu/src/github.com/weaveworks/weave/test/coverage/* ./coverage/ || true
done
fi
go get github.com/weaveworks/weave/testing/cover
cover ./coverage/* >profile.cov
go tool cover -html=profile.cov -o coverage.html
go tool cover -func=profile.cov -o coverage.txt
tar czf coverage.tar.gz ./coverage