mirror of
https://github.com/weaveworks/scope.git
synced 2026-03-03 02:00:43 +00:00
only produce coverage for the module in the current dir
and its sub-modules ...rather than all modules containing `weaveworks`.
This commit is contained in:
4
test
4
test
@@ -31,12 +31,14 @@ if [ -n "$CIRCLECI" -a -z "$NO_SCHEDULER" -a -x "$DIR/sched" ]; then
|
||||
echo $TESTDIRS
|
||||
fi
|
||||
|
||||
PACKAGE_BASE=$(go list -e ./)
|
||||
|
||||
for dir in $TESTDIRS; do
|
||||
go get -t -tags netgo $dir
|
||||
|
||||
GO_TEST_ARGS_RUN="$GO_TEST_ARGS"
|
||||
if [ -n "$SLOW" ]; then
|
||||
COVERPKGS=$((go list $dir; go list -f '{{join .Deps "\n"}}' $dir | grep "weaveworks") | paste -s -d,)
|
||||
COVERPKGS=$((go list $dir; go list -f '{{join .Deps "\n"}}' $dir | grep "^$PACKAGE_BASE/") | paste -s -d,)
|
||||
output=$(mktemp $coverdir/unit.XXXXXXXXXX)
|
||||
GO_TEST_ARGS_RUN="$GO_TEST_ARGS -coverprofile=$output -coverpkg=$COVERPKGS"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user