From 9a91b3ce9c8034a68345570fa6c94c597bb404f9 Mon Sep 17 00:00:00 2001 From: Matthias Radestock Date: Mon, 27 Jul 2015 17:08:31 +0100 Subject: [PATCH] include directory of test code in coverage Fixes #1220. --- test/units.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/units.sh b/test/units.sh index 5b461326..a630a6ab 100755 --- a/test/units.sh +++ b/test/units.sh @@ -32,7 +32,7 @@ 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,) + COVERPKGS=$((go list $dir; 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 -coverpkg=$COVERPKGS" fi