When running unit tests, output coverage for imported modules.
This commit is contained in:
1 parent
e34093c328
commit
a9dae46110
1 file changed
+2
-1
+2
-1
@@ -32,8 +32,9 @@ for dir in $TESTDIRS; do
|
|||||||
|
|
||||||
GO_TEST_ARGS_RUN="$GO_TEST_ARGS"
|
GO_TEST_ARGS_RUN="$GO_TEST_ARGS"
|
||||||
if [ -n "$SLOW" ]; then
|
if [ -n "$SLOW" ]; then
|
||||||
|
COVERPKGS=$(go list -f '{{join .Deps "\n"}}' $dir | grep "weaveworks" | paste -s -d,)
|
||||||
output=$(mktemp $coverdir/unit.XXXXXXXXXX)
|
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
|
fi
|
||||||
|
|
||||||
START=$(date +%s)
|
START=$(date +%s)
|
||||||
|
|||||||
Reference in new issue
Block a user