webrtc/tools/continuous_build/build_internal/masters/master.tryserver.webrtc/master.cfg
kjellander@webrtc.org a96eead975 Updating Windows debug try slave hostname
BUG=None
TEST=None needed.

Review URL: https://webrtc-codereview.appspot.com/492004

git-svn-id: http://webrtc.googlecode.com/svn/trunk@2009 4adac7df-926f-26a2-2b94-8c16560cd09d
2012-04-12 06:16:50 +00:00

266 lines
9.7 KiB
Python
Executable File

#!/usr/bin/env python
# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
#
# Use of this source code is governed by a BSD-style license
# that can be found in the LICENSE file in the root of the source
# tree. An additional intellectual property rights grant can be found
# in the file PATENTS. All contributing project authors may
# be found in the AUTHORS file in the root of the source tree.
__author__ = 'kjellander@webrtc.org (Henrik Kjellander)'
c = BuildmasterConfig = {}
import os
from buildbot.buildslave import BuildSlave
from buildbot.changes.pb import PBChangeSource
from buildbot.changes.svnpoller import SVNPoller
from buildbot.process import factory
from buildbot.scheduler import Scheduler
from buildbot.status import html
from buildbot.status import mail
from buildbot.steps import shell
# These modules come from scripts, which must be in the PYTHONPATH.
from master import master_utils
from master import slaves_list
from master.builders_pools import BuildersPools
from master.try_job_http import TryJobHTTP
from master.try_job_svn import TryJobSubversion
from master.try_mail_notifier import TryMailNotifier
import config
from webrtc_buildbot import utils
ActiveMaster = config.Master.TryServer
####### CHANGESOURCES
c['change_source'] = []
####### SCHEDULERS
pools = BuildersPools('webrtc')
pools['webrtc'].append('linux')
pools['webrtc'].append('linux_rel')
pools['webrtc'].append('mac')
pools['webrtc'].append('mac_rel')
pools['webrtc'].append('win')
pools['webrtc'].append('win_rel')
last_good_urls = {'webrtc': ActiveMaster.last_good_url}
code_review_sites = {'webrtc': ActiveMaster.code_review_site}
try_scheduler = TryJobHTTP(name='try_job_http',
port=ActiveMaster.try_job_port,
last_good_urls=last_good_urls,
code_review_sites=code_review_sites,
pools=pools)
c['schedulers'] = [try_scheduler]
####### TESTS
# Tests to run on the trybots
# Defines the supported tests followed by a tuple defining if the tests are
# enabled on Linux, Mac and/or Windows (in that order; defined in utils.py).
NORMAL_TESTS = {
# Test name Linux Mac Windows
'audio_coding_unittests': (True, True, True),
'audio_conference_mixer_unittests':(True, True, True),
'audioproc_unittest': (True, True, True),
'cng_unittests': (True, True, True),
'g711_unittests': (True, True, True),
'g722_unittests': (True, True, True),
'libyuv_unittests': (True, True, True),
'jpeg_unittests': (True, True, True),
'media_file_unittests': (True, True, True),
'metrics_unittests': (True, True, True),
'neteq_unittests': (True, True, True),
'pcm16b_unittests': (True, True, True),
'resampler_unittests': (True, True, True),
'rtp_rtcp_unittests': (True, True, True),
'signal_processing_unittests': (True, True, True),
'system_wrappers_unittests': (True, True, True),
'test_support_unittests': (True, True, True),
'udp_transport_unittests': (True, True, True),
'vad_unittests': (True, True, True),
'video_codecs_test_framework_unittests': (True, True, True),
'video_coding_unittests': (True, True, True),
'video_engine_core_unittests': (True, True, True),
'video_processing_unittests': (True, True, True),
'voice_engine_unittests': (True, True, True),
'vp8_unittests': (True, False, True), # Issue 273.
'webrtc_utility_unittests': (True, True, False),
}
linux_normal_tests = utils.GetEnabledTests(NORMAL_TESTS, 'Linux')
mac_normal_tests = utils.GetEnabledTests(NORMAL_TESTS, 'Mac')
windows_normal_tests = utils.GetEnabledTests(NORMAL_TESTS, 'Windows')
####### FACTORIES
# Linux
linux_factory_dbg = utils.WebRTCLinuxFactory(
utils.BuildStatusOracle('linux_factory_dbg'), is_try_slave=True)
linux_factory_dbg.EnableBuild()
linux_factory_dbg.EnableTests(linux_normal_tests)
linux_factory_release = utils.WebRTCLinuxFactory(
utils.BuildStatusOracle('linux_factory_release'), is_try_slave=True)
linux_factory_release.EnableBuild()
linux_factory_release.EnableTests(linux_normal_tests)
# Mac
mac_factory_dbg = utils.WebRTCMacFactory(
utils.BuildStatusOracle('mac_factory_dbg'), is_try_slave=True)
mac_factory_dbg.EnableBuild(build_type='make')
mac_factory_dbg.EnableTests(mac_normal_tests)
mac_factory_release = utils.WebRTCMacFactory(
utils.BuildStatusOracle('mac_factory_release'), is_try_slave=True)
mac_factory_release.EnableBuild(build_type='make')
mac_factory_release.EnableTests(mac_normal_tests)
# Windows
win_factory_debug = utils.WebRTCWinFactory(
utils.BuildStatusOracle('win_factory_debug'), is_try_slave=True)
win_factory_debug.EnableBuild(configuration='Debug')
win_factory_debug.EnableTests(windows_normal_tests)
win_factory_release = utils.WebRTCWinFactory(
utils.BuildStatusOracle('win_factory_release'), is_try_slave=True)
win_factory_release.EnableBuild(configuration='Release')
win_factory_release.EnableTests(windows_normal_tests)
####### BUILDERS
linux_builder_debug = {
'name': 'linux',
'slavename': 'webrtc-cb-linux-slave-11',
'builddir': 'linux-trybot-1',
'factory': linux_factory_dbg,
}
linux_builder_release = {
'name': 'linux_rel',
'slavename': 'webrtc-cb-linux-slave-12',
'builddir': 'linux-trybot-2',
'factory': linux_factory_release,
}
mac_builder_debug = {
'name': 'mac',
'slavename': 'dhcp-172-28-249-242',
'builddir': 'mac-trybot-1',
'factory': mac_factory_dbg,
}
mac_builder_release = {
'name': 'mac_rel',
'slavename': 'dhcp-172-28-249-244',
'builddir': 'mac-trybot-2',
'factory': mac_factory_release,
}
win_builder_debug = {
'name': 'win',
'slavename': 'webrtc-win2k8-3',
'builddir': 'win-trybot-1',
'factory': win_factory_debug,
}
win_builder_release = {
'name': 'win_rel',
'slavename': 'webrtc-win-x86',
'builddir': 'win-trybot-2',
'factory': win_factory_release,
}
c['builders'] = [
win_builder_debug,
win_builder_release,
mac_builder_debug,
mac_builder_release,
linux_builder_debug,
linux_builder_release,
]
def NextJob(builder, requests):
"""Always prioritize commit queue jobs over try jobs."""
for req in requests:
if any(c.who == 'commit-bot@webrtc.org' for c in req.source.changes):
return req
return requests[0]
# Slaves are loaded from slaves.cfg.
slaves = slaves_list.SlavesList('slaves.cfg', 'TryServer')
for builder in c['builders']:
# Associate the slaves to the builders. The configuration is in slaves.cfg.
builder['slavenames'] = slaves.GetSlavesName(builder=builder['name'])
# Don't enable auto_reboot for our bots (Chrome uses it since they don't trust
# their unit tests to clean up properly)
builder['auto_reboot'] = False
# Prioritize commit-queue jobs over try jobs.
# This is documented starting with 0.8.2
# http://buildbot.net/buildbot/docs/0.8.2/Prioritizing-Builds.html#Prioritizing-Builds
# but appears to be working on 0.7.12 already.
builder['nextBuild'] = NextJob
####### BUILDSLAVES
# The 'slaves' list defines the set of allowable buildslaves. List all the
# slaves registered to a builder. Remove dupes.
c['slaves'] = master_utils.AutoSetupSlaves(c['builders'],
config.Master.GetBotPassword())
# Make sure everything works together.
master_utils.VerifySetup(c, slaves)
# Adds common status and tools to this master.
# Use our own mail notifier.
master_utils.AutoSetupMaster(c, ActiveMaster, False,
public_html='../master.webrtc/public_html',
templates=['./templates',
'../master.webrtc/templates'])
####### STATUS TARGETS
# Port 9010 is the same as Chromium's try server web interface:
web_page = html.WebStatus(http_port=9010, allowForce=True)
c['status'] = [web_page]
# Use an environment variable to easily avoid enabling e-mail for development.
if not os.getenv('BUILDBOT_DEVELOPMENT_MODE'):
email_status = mail.MailNotifier(
fromaddr='webrtc-try-watchlist@google.com',
extraRecipients=['webrtc-try-watchlist@google.com'],
sendToInterestedUsers=True,
mode='failing')
c['status'] += [email_status]
# Try job result emails.
c['status'].append(TryMailNotifier(
fromaddr='webrtc-try-watchlist@google.com',
subject='try %(result)s for %(reason)s on %(builder)s @ r%(revision)s',
mode='all',
lookup=master_utils.UsersAreEmails()))
####### DB URL
# This specifies what database buildbot uses to store change and scheduler
# state. You can leave this at its default for all but the largest
# installations.
c['db_url'] = 'sqlite:///state.sqlite'
####### DEBUGGING OPTIONS
# if you set 'debugPassword', then you can connect to the buildmaster with
# the diagnostic tool in contrib/debugclient.py . From this tool, you can
# manually force builds and inject changes, which may be useful for testing
# your buildmaster without actually committing changes to your repository (or
# before you have a functioning 'sources' set up). The debug tool uses the
# 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')