2013-12-09 03:20:55 +00:00
|
|
|
#!/bin/bash
|
2014-04-08 04:14:19 +00:00
|
|
|
set -e
|
2013-12-09 03:20:55 +00:00
|
|
|
|
|
|
|
bundle_cover() {
|
|
|
|
coverprofiles=( "$DEST/../"*"/coverprofiles/"* )
|
|
|
|
for p in "${coverprofiles[@]}"; do
|
|
|
|
echo
|
|
|
|
(
|
|
|
|
set -x
|
|
|
|
go tool cover -func="$p"
|
|
|
|
)
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
|
|
|
if [ "$HAVE_GO_TEST_COVER" ]; then
|
|
|
|
bundle_cover 2>&1 | tee "$DEST/report.log"
|
|
|
|
else
|
|
|
|
echo >&2 'warning: the current version of go does not support -cover'
|
|
|
|
echo >&2 ' skipping test coverage report'
|
|
|
|
fi
|