Merge pull request #12 from weaveworks/prefix-unit-test-sched

Use golang package name as a prefix on unit test schedules.
This commit is contained in:
Paul Bellamy
2015-12-07 14:50:02 +00:00

3
test
View File

@@ -50,7 +50,8 @@ TESTDIRS=$(find . -type f -name '*_test.go' | xargs -n1 dirname | grep -vE '^\./
# If running on circle, use the scheduler to work out what tests to run on what shard # 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 if [ -n "$CIRCLECI" -a -z "$NO_SCHEDULER" -a -x "$DIR/sched" ]; then
TESTDIRS=$(echo $TESTDIRS | "$DIR/sched" sched units-$CIRCLE_BUILD_NUM $CIRCLE_NODE_TOTAL $CIRCLE_NODE_INDEX) PREFIX=$(go list -e ./ | sed -e 's/\//-/g')
TESTDIRS=$(echo $TESTDIRS | "$DIR/sched" sched $PREFIX-$CIRCLE_BUILD_NUM $CIRCLE_NODE_TOTAL $CIRCLE_NODE_INDEX)
echo $TESTDIRS echo $TESTDIRS
fi fi