mozilla-tests/tests_master.cfg
author Aki Sasaki <asasaki@mozilla.com>
Tue, 29 Mar 2011 15:37:52 -0700
changeset 3856 98b401d22226309d9b99cc1f74abdbcfa5bf4337
parent 3767 a41616f7cab948242854a178848f1c9e2b8d1dd6
child 4340 1fb7b29aa569fcfb92eb8cb8e49fc3ae53e97fec
permissions -rw-r--r--
bug 645283 - EOL Fennec 1.1, r=jhford

# vim: ft=python
from copy import deepcopy

# import/reload dance so that reconfigs work
import master_common
import config
import master_localconfig
import buildbotcustom.misc
reload(master_common)
reload(config)
reload(master_localconfig)
reload(buildbotcustom.misc)

from master_common import BuildmasterConfig
c = BuildmasterConfig
for key, value in master_localconfig.BuildmasterConfig.items():
    if key in c:
        c[key].extend(value)
    else:
        c[key] = value

from config import BRANCHES, PLATFORMS, SUITES, BRANCH_UNITTEST_VARS, SLAVES, PROJECTS
from master_localconfig import ACTIVE_BRANCHES, ACTIVE_PLATFORMS, ACTIVE_PROJECTS

import BuildSlaves
reload(BuildSlaves)
from BuildSlaves import SlavePasswords
from buildbot.buildslave import BuildSlave

for platform, slaves in SLAVES.items():
    for name in sorted(slaves.keys()):
        c['slaves'].append(BuildSlave(name, SlavePasswords[platform], max_builds=1,
                                      properties=slaves[name]))

from buildbotcustom.misc import generateTalosBranchObjects, generateProjectObjects, \
         mergeBuildObjects

from buildbot.schedulers.triggerable import Triggerable

for p in ACTIVE_PLATFORMS.keys():
    ACTIVE_PLATFORMS[p] = deepcopy(PLATFORMS[p])

buildObjects = {}

for branch in ACTIVE_BRANCHES:
    talosObjects = generateTalosBranchObjects(branch, BRANCHES[branch],
                                                ACTIVE_PLATFORMS, SUITES,
                                                BRANCH_UNITTEST_VARS['platforms'])
    buildObjects = mergeBuildObjects(buildObjects, talosObjects)

for project in ACTIVE_PROJECTS:
    projectObjects = generateProjectObjects(project, PROJECTS[project], SLAVES)
    buildObjects = mergeBuildObjects(buildObjects, projectObjects)

# We only want builders, status objects
c['builders'].extend(buildObjects['builders'])
c['status'].extend(buildObjects['status'])
# We need just the triggerable schedulers here
for s in buildObjects['schedulers']:
    if isinstance(s, Triggerable):
        c['schedulers'].append(s)

# Required for sendchange
from buildbot.changes.pb import PBChangeSource
c['change_source'].append(PBChangeSource())

import passwords
from passwords import BBDB_URL
c['db_url'] = BBDB_URL
c['db_poll_interval'] = 60
c['multiMaster'] = True

c['mergeRequests'] = buildbotcustom.misc.mergeRequests

# c is shorthand for BuildmasterConfig, so make sure they still refer to the
# same thing
assert c is BuildmasterConfig