Skip to content

Commit

Permalink
Merge pull request #1198 from weaveworks/1146-coverage
Browse files Browse the repository at this point in the history
When running unit tests, output coverage for imported modules.
  • Loading branch information
tomwilkie committed Jul 20, 2015
2 parents e34093c + a9dae46 commit 4c9b0be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/units.sh
Expand Up @@ -32,8 +32,9 @@ for dir in $TESTDIRS; do

GO_TEST_ARGS_RUN="$GO_TEST_ARGS"
if [ -n "$SLOW" ]; then
COVERPKGS=$(go list -f '{{join .Deps "\n"}}' $dir | grep "weaveworks" | paste -s -d,)
output=$(mktemp $coverdir/unit.XXXXXXXXXX)
GO_TEST_ARGS_RUN="$GO_TEST_ARGS -coverprofile=$output"
GO_TEST_ARGS_RUN="$GO_TEST_ARGS -coverprofile=$output -coverpkg=$COVERPKGS"
fi

START=$(date +%s)
Expand Down

0 comments on commit 4c9b0be

Please sign in to comment.