mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Testing, issue #1217: Add coverage testing into docker-ci
This commit is contained in:
parent
1004d57b85
commit
6e8bfc8d12
1 changed files with 20 additions and 5 deletions
|
@ -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)]),
|
||||
|
|
Loading…
Reference in a new issue