Don't run tests in ./vendor

This commit is contained in:
Tom Wilkie
2015-10-23 08:54:11 +00:00
parent 8262e7e18e
commit 785f9ebe7d
2 changed files with 3 additions and 3 deletions

2
lint
View File

@@ -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
View File

@@ -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