Files
docker-cli/components/engine/hack/make/cover
Tianon Gravi 6a19f653da Add new cover bundlescript for giving a nice report across all the coverprofiles generated by the test scripts
Upstream-commit: 59dc2876a7d2ac0e231d7d97511e572a1d739136
Component: engine
2013-12-13 11:59:54 -07:00

22 lines
391 B
Bash

#!/bin/bash
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