1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00
moby--moby/project/make/cover
Solomon Hykes 32e61b8f5c Move 'hack' to the less confusing 'project'
We might want to break it up into smaller pieces (eg. tools in one
place, documents in another) but let's worry about that later.

Signed-off-by: Solomon Hykes <solomon@docker.com>
2014-11-09 21:50:28 +00:00

22 lines
398 B
Bash

#!/bin/bash
set -e
DEST="$1"
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