mirror of
https://github.com/weaveworks/scope.git
synced 2026-07-28 01:31:17 +00:00
Don't run tests in ./vendor
This commit is contained in:
2
lint
2
lint
@@ -148,7 +148,7 @@ function lint_files {
|
||||
|
||||
function list_files {
|
||||
if [ $# -gt 0 ]; then
|
||||
find "$@" -type f | grep -vE '^\./\.git/' | grep -vE '^\./\vendor/'
|
||||
find "$@" -type f | grep -vE '^\./(\.git|vendor)/'
|
||||
else
|
||||
git diff --cached --name-only
|
||||
fi
|
||||
|
||||
4
test
4
test
@@ -23,7 +23,7 @@ fi
|
||||
|
||||
fail=0
|
||||
|
||||
TESTDIRS=$(find . -type f -name '*_test.go' | xargs -n1 dirname | grep -v prog | grep -v experimental | sort -u)
|
||||
TESTDIRS=$(find . -type f -name '*_test.go' | xargs -n1 dirname | grep -vE '^\./(\.git|vendor|prog|experimental)/' | sort -u)
|
||||
|
||||
# If running on circle, use the scheduler to work out what tests to run on what shard
|
||||
if [ -n "$CIRCLECI" -a -z "$NO_SCHEDULER" -a -x "$DIR/sched" ]; then
|
||||
@@ -38,7 +38,7 @@ for dir in $TESTDIRS; do
|
||||
|
||||
GO_TEST_ARGS_RUN="$GO_TEST_ARGS"
|
||||
if [ -n "$SLOW" ]; then
|
||||
COVERPKGS=$((go list $dir; go list -f '{{join .Deps "\n"}}' $dir | grep "^$PACKAGE_BASE/") | 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