Speed up test by using git ls-files

This commit is contained in:
Jonathan Lange
2016-07-14 16:42:38 +01:00
parent cf53dc1f19
commit 8b7ec6ebbc

2
test
View File

@@ -47,7 +47,7 @@ fi
fail=0
TESTDIRS=( $(find . -type f -name '*_test.go' -print0 | xargs -0 -n1 dirname | grep -vE '^\./(\.git|vendor|prog|experimental)/' | sort -u) )
TESTDIRS=( $(git ls-files -- '*_test.go' | grep -vE '^(vendor|prog|experimental)/' | xargs -n1 dirname | sort -u) )
# If running on circle, use the scheduler to work out what tests to run on what shard
if [ -n "$CIRCLECI" ] && [ -z "$NO_SCHEDULER" ] && [ -x "$DIR/sched" ]; then