Adapting master.cfg to reflect the modifications on lib/gdbbuilder.py

This commit is contained in:
Sergio Durigan Junior 2014-12-13 03:45:56 -05:00
parent ff2c10d2be
commit 302a8eedbf

View file

@ -1,106 +1,127 @@
# -*- python -*- # -*- python -*-
# ex: set syntax=python: # ex: set syntax=python:
from buildbot.buildslave import BuildSlave #from gdbbuilder import make_gdb_builder
from gdbgitpoller import GDBGitPoller from gdbbuilder import load_config
# from buildbot.changes.gitpoller import GitPoller
from buildbot.changes.pb import PBChangeSource
from buildbot.process import factory
from buildbot.process.buildstep import LogLineObserver
from buildbot.process.properties import WithProperties
from buildbot.scheduler import AnyBranchScheduler
from buildbot.scheduler import Scheduler
from buildbot.scheduler import Try_Jobdir
from buildbot.scheduler import Try_Userpass
from buildbot.schedulers.filter import ChangeFilter
from buildbot.status import html
from buildbot.status.builder import SUCCESS, WARNINGS, FAILURE, EXCEPTION
from buildbot.steps.python_twisted import Trial
from buildbot.steps.shell import Compile
from buildbot.steps.shell import Configure
from buildbot.steps.shell import SetProperty
from buildbot.steps.shell import ShellCommand
from buildbot.steps.source import Git
from gdbbuilder import make_gdb_builder
from sumfiles import DejaResults, set_web_base from sumfiles import DejaResults, set_web_base
import os.path import os.path
import urllib import urllib
from buildbot.status import words
# This is a sample buildmaster config file. It must be installed as
# 'master.cfg' in your buildmaster's base directory.
# This is the dictionary that the buildmaster pays attention to. We also use # This is the dictionary that the buildmaster pays attention to. We also use
# a shorter alias to save typing. # a shorter alias to save typing.
c = BuildmasterConfig = {} c = BuildmasterConfig = {}
c['mergeRequests'] = False ####### BUILDSLAVES
c['slavePortnum'] = 9989 # The 'slaves' list defines the set of recognized buildslaves. Each element is
# a BuildSlave object, specifying a unique slave name and password. The same
c['change_source'] = [ # slave name and password must be configured on the slave.
PBChangeSource(),
# Didn't finish fixing this; it was simpler to just use cron.
# GDBGitPoller(repourl = 'git://sourceware.org/git/gdb.git',
# workdir = '/home/buildbot/GitWatcher/gdb/',
# branch = ['master', 'gdb_7_3-branch'])
]
# Base directory for the web server. # Base directory for the web server.
gdb_web_base = os.path.expanduser(os.path.join(basedir, 'public_html', gdb_web_base = os.path.expanduser(os.path.join(basedir, 'public_html',
'results')) 'results'))
set_web_base (gdb_web_base) set_web_base (gdb_web_base)
all_gdb_builders = [ #all_gdb_builders = [
make_gdb_builder ('f14', 'x86_64'), # make_gdb_builder ('f20', 'x86_64'),
make_gdb_builder ('f14', 'x86_64', 'dwarf4'), # make_gdb_builder ('f14', 'x86_64', 'dwarf4'),
make_gdb_builder ('f14', 'x86_64', 'index'), # make_gdb_builder ('f14', 'x86_64', 'index'),
make_gdb_builder ('f14', 'x86_64', 'm32'), # make_gdb_builder ('f20', 'x86_64', 'm32'),
make_gdb_builder ('f14', 'x86_64', 'gdbserver'), # make_gdb_builder ('f20', 'x86_64', 'gdbserver'),
] # ]
all_gdb_builder_names = [] #all_gdb_builder_names = []
c['slaves'] = [] #c['slaves'] = []
for builder in all_gdb_builders: #from buildbot.buildslave import BuildSlave
name = builder['name'] #for builder in all_gdb_builders:
all_gdb_builder_names.append(name) # name = builder['name']
c['slaves'].append(BuildSlave(name, name + '-password', # yes -- lame # all_gdb_builder_names.append(name)
max_builds = 1)) # c['slaves'].append(BuildSlave(name, name + '-password', max_builds = 1))
# c['slaves'] = [BuildSlave("gdb-slave", "pwdgdb")]
c['builders'] = all_gdb_builders
# FIXME: we'd like to make the Try builder run the baseline build # 'protocols' contains information about protocols which master will use for
# using a triggerable builder, but it isn't clear whether this is # communicating with slaves.
# possible. # You must define at least 'port' option that slaves could connect to your master
# with this protocol.
# 'port' must match the value configured into the buildslaves (with their
# --master option)
c['protocols'] = {'pb': {'port': 9989}}
#c['protocols'] = {"pb": {"port": "tcp:10000:interface=127.0.0.1"}}
c['schedulers'] = [] ####### CHANGESOURCES
branch_filter = ChangeFilter(branch = ['master', # the 'change_source' setting tells the buildmaster how it should find out
'gdb_7_3-branch']) # about source code changes. Here we point to the buildbot clone of pyflakes.
c['schedulers'].append(AnyBranchScheduler(name="all",
change_filter = branch_filter, from buildbot.changes.gitpoller import GitPoller
treeStableTimer = 0, c['change_source'] = []
builderNames = all_gdb_builder_names, c['change_source'].append(GitPoller(
properties = { 'isTryBuilder' : 'no' })) # repourl = 'git://sourceware.org/git/binutils-gdb.git',
repourl = 'file:///home/buildbot/binutils-gdb',
workdir='/home/buildbot/my-binutils-gdb',
branches= [ 'master' ],
pollinterval=30))
# 'git://github.com/buildbot/pyflakes.git',
# workdir='gitpoller-workdir', branch='master',
# pollinterval=300))
####### SCHEDULERS
# Configure the Schedulers, which decide how to react to incoming changes. In this
# case, just kick off a 'runtests' build
from buildbot.schedulers.basic import SingleBranchScheduler, AnyBranchScheduler
from buildbot.schedulers.forcesched import ForceScheduler
from buildbot.changes import filter
#c['schedulers'] = []
#branch_filter = filter.ChangeFilter(branch = ['master'])
#c['schedulers'].append(AnyBranchScheduler(name="all", #c['schedulers'].append(AnyBranchScheduler(name="all",
# branch = 'master', # change_filter = branch_filter,
# treeStableTimer = 0, # treeStableTimer = None,
# builderNames = all_gdb_builder_names, # builderNames = all_gdb_builder_names,
# properties = { 'isTryBuilder' : 'no' })) # properties = { 'isTryBuilder' : 'no' }))
# c['schedulers'].append(Try_Jobdir("try1", #c['schedulers'] = []
# builderNames = all_gdb_builder_names, #c['schedulers'].append(SingleBranchScheduler(
# jobdir = '/home/buildbot/Jobs', # name="all",
# properties = { 'isTryBuilder' : 'yes' })) # change_filter=filter.ChangeFilter(branch='master'),
# treeStableTimer=None,
# builderNames=["runtests"]))
#c['schedulers'].append(ForceScheduler(
# name="force",
# builderNames=["runtests"]))
gdb_users = [] ####### BUILDERS
# FIXME init gdb_users here
c['schedulers'].append(Try_Userpass("try1", # The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
builderNames = all_gdb_builder_names, # what steps, and which slaves can execute them. Note that any particular build will
port = 8031, # only take place on one slave.
userpass = gdb_users,
properties = { 'isTryBuilder' : 'yes' }))
from buildbot.process.factory import BuildFactory
from buildbot.steps.source.git import Git
from buildbot.steps.shell import ShellCommand
#factory = BuildFactory()
# check out the source
#factory.addStep(Git(repourl='git://github.com/buildbot/pyflakes.git', mode='incremental'))
# run the tests (note that this will require that 'trial' is installed)
#factory.addStep(ShellCommand(command=["trial", "pyflakes"]))
from buildbot.config import BuilderConfig
#c['builders'] = all_gdb_builders
#c['builders'] = []
#c['builders'].append(
# BuilderConfig(name="runtests",
# slavenames=["example-slave"],
# factory=factory))
####### STATUS TARGETS ####### STATUS TARGETS
@ -115,53 +136,66 @@ c['status'] = []
cc_re_tuple = (r'(PR [a-z]+/|PR ?|#)(\d+)', cc_re_tuple = (r'(PR [a-z]+/|PR ?|#)(\d+)',
r'http://sourceware.org/bugzilla/show_bug.cgi?id=\2') r'http://sourceware.org/bugzilla/show_bug.cgi?id=\2')
c['status'].append(html.WebStatus(http_port=8010, from buildbot.status import html
allowForce=False, from buildbot.status.web import authz, auth
order_console_by_time=True,
changecommentlink=cc_re_tuple
))
c['status'].append(words.IRC(host="irc.yyz.redhat.com", nick="gdbbot", authz_cfg=authz.Authz(
channels=["#gdb"])) # change any of these to True to enable; see the manual for more
# options
# auth=auth.BasicAuth([("t","t")]),
gracefulShutdown = False,
forceBuild = True, # use this to test your slave once it is set up
# forceAllBuilds = 'auth', # ..or this
pingBuilder = False,
stopBuild = True,
stopAllBuilds = True,
cancelPendingBuild = True,
)
c['status'].append(html.WebStatus(http_port=8010, authz=authz_cfg))
# from buildbot.status import client #c['status'].append(html.WebStatus(http_port=8010,
# c['status'].append(client.PBListener(9988)) # forceBuild = True,
# allowForce=False,
# order_console_by_time=True,
# changecommentlink=cc_re_tuple))
#from buildbot.status import words
#c['status'].append(words.IRC(host="irc.yyz.redhat.com", nick="sdj-gdbbot",
# channels=["#gdbbuild"]))
####### DEBUGGING OPTIONS #from buildbot.status import mail
#mn = mail.MailNotifier(fromaddr="sergiodj@redhat.com",
# if you set 'debugPassword', then you can connect to the buildmaster with # sendToInterestedUsers=False,
# the diagnostic tool in contrib/debugclient.py . From this tool, you can # extraRecipients=['gdb-testers@sourceware.org'],
# manually force builds and inject changes, which may be useful for testing # relayhost="smtp.corp.redhat.com",
# your buildmaster without actually committing changes to your repository (or # mode=('failing'),
# before you have a functioning 'sources' set up). The debug tool uses the # smtpPort=25)
# same port number as the slaves do: 'slavePortnum'.
#c['debugPassword'] = "debugpassword"
# if you set 'manhole', you can ssh into the buildmaster and get an
# interactive python shell, which may be useful for debugging buildbot
# internals. It is probably only useful for buildbot developers. You can also
# use an authorized_keys file, or plain telnet.
#from buildbot import manhole
#c['manhole'] = manhole.PasswordManhole("tcp:9999:interface=127.0.0.1",
# "admin", "password")
#c['status'].append(mn)
####### PROJECT IDENTITY ####### PROJECT IDENTITY
# the 'projectName' string will be used to describe the project that this # the 'title' string will appear at the top of this buildbot
# buildbot is working on. For example, it is used as the title of the # installation's html.WebStatus home page (linked to the
# waterfall HTML page. The 'projectURL' string will be used to provide a link # 'titleURL') and is embedded in the title of the waterfall HTML page.
# from buildbot HTML pages to your project's home page.
c['projectName'] = "GDB" c['title'] = "GDB"
c['projectURL'] = "http://sourceware.org/gdb/" c['titleURL'] = "https://gnu.org/s/gdb"
# the 'buildbotURL' string should point to the location where the buildbot's # the 'buildbotURL' string should point to the location where the buildbot's
# internal web server (usually the html.Waterfall page) is visible. This # internal web server (usually the html.WebStatus page) is visible. This
# typically uses the port number set in the Waterfall 'status' entry, but # typically uses the port number set in the Waterfall 'status' entry, but
# with an externally-visible host name which the buildbot cannot figure out # with an externally-visible host name which the buildbot cannot figure out
# without some help. # without some help.
c['buildbotURL'] = "http://localhost:8010/" c['buildbotURL'] = "http://localhost:8010/"
####### DB URL
c['db'] = {
# This specifies what database buildbot uses to store its state. You can leave
# this at its default for all but the largest installations.
'db_url' : "sqlite:///state.sqlite",
}
load_config (c)