diff --git a/testing/buildbot/master.cfg b/testing/buildbot/master.cfg index 65399bb1a1..61912808ec 100644 --- a/testing/buildbot/master.cfg +++ b/testing/buildbot/master.cfg @@ -2,6 +2,7 @@ import os from buildbot.buildslave import BuildSlave from buildbot.schedulers.forcesched import ForceScheduler from buildbot.schedulers.basic import SingleBranchScheduler +from buildbot.schedulers.timed import Nightly from buildbot.changes import filter from buildbot.config import BuilderConfig from buildbot.process.factory import BuildFactory @@ -40,12 +41,16 @@ c['db'] = {'db_url':"sqlite:///state.sqlite"} c['slaves'] = [BuildSlave('buildworker', BUILDBOT_PWD)] c['slavePortnum'] = PORT_MASTER -c['schedulers'] = [ForceScheduler(name='trigger',builderNames=[BUILDER_NAME])] -c['schedulers'].append(SingleBranchScheduler(name="all", - change_filter=filter.ChangeFilter(branch='master'),treeStableTimer=None, - builderNames=[BUILDER_NAME])) +# Schedulers +c['schedulers'] = [ForceScheduler(name='trigger', builderNames=[BUILDER_NAME, + 'coverage'])] +c['schedulers'] += [SingleBranchScheduler(name="all", + change_filter=filter.ChangeFilter(branch='master'), treeStableTimer=None, + builderNames=[BUILDER_NAME])] +c['schedulers'] += [Nightly(name='daily', branch=None, builderNames=['coverage'], + hour=0, minute=30)] -# Builder +# Builders factory = BuildFactory() factory.addStep(ShellCommand(description='Docker',logEnviron=False,usePTY=True, command=["sh", "-c", Interpolate("cd ..; rm -rf build; export GOPATH={0}; " @@ -53,6 +58,16 @@ factory.addStep(ShellCommand(description='Docker',logEnviron=False,usePTY=True, "go test -v".format(BUILDER_PATH,GITHUB_DOCKER,DOCKER_BUILD_PATH))])) c['builders'] = [BuilderConfig(name=BUILDER_NAME,slavenames=['buildworker'], factory=factory)] +# Docker coverage test +coverage_cmd = ('GOPATH=`pwd` go get -d github.com/dotcloud/docker\n' + 'GOPATH=`pwd` go get github.com/axw/gocov/gocov\n' + 'sudo -E GOPATH=`pwd` ./bin/gocov test github.com/dotcloud/docker | ' + './bin/gocov report') +factory = BuildFactory() +factory.addStep(ShellCommand(description='Coverage',logEnviron=False,usePTY=True, + command=coverage_cmd)) +c['builders'] += [BuilderConfig(name='coverage',slavenames=['buildworker'], + factory=factory)] # Status authz_cfg = authz.Authz(auth=auth.BasicAuth([(TEST_USER, TEST_PWD)]),