mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-04 18:51:17 +00:00
22 lines
604 B
Bash
Executable File
22 lines
604 B
Bash
Executable File
#!/bin/bash
|
|
# This scripts copies all the coverage reports from various circle shards,
|
|
# merges them and produces a complete report.
|
|
|
|
set -ex
|
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
DESTINATION=$1
|
|
FROMDIR=$2
|
|
mkdir -p $DESTINATION
|
|
|
|
if [ -n "$CIRCLECI" ]; then
|
|
for i in $(seq 1 $(($CIRCLE_NODE_TOTAL - 1))); do
|
|
scp node$i:$FROMDIR/* $DESTINATION || true
|
|
done
|
|
fi
|
|
|
|
go get github.com/weaveworks/build-tools/cover
|
|
cover $DESTINATION/* >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 $DESTINATION
|