mozilla-tests/tests_localconfig.py
author John Ford <jhford@mozilla.com>
Tue, 31 Jan 2012 13:54:07 -0800
changeset 5388 13dba078906555b91b09cca82f9a797dc34b442a
parent 4723 f017fae779fecb6c514f36d2586a800bfd7cd8a4
child 5790 bb260b55320e0da5b7143c0e6cce39b9ef2082e8
permissions -rw-r--r--
bug 722572 - optionally load queuedir from master_config.json r=rail

from buildbot.util import json
from buildbot.status.html import WebStatus
from buildbot import manhole

master_config = json.load(open('master_config.json'))

c = BuildmasterConfig = {}
c['slavePortnum'] = master_config.get('pb_port', None)
c['status'] = []

if 'http_port' in master_config:
    c['status'].append(
            WebStatus(http_port=master_config['http_port'], allowForce=True))
    c['buildbotURL'] = 'http://%(hostname)s:%(http_port)i/' % master_config

if 'ssh_port' in master_config:
    c['manhole'] = manhole.PasswordManhole(
            "tcp:%(ssh_port)i:interface=127.0.0.1" % master_config,
            "cltbld", "password")

from config import BRANCHES, PLATFORMS, PROJECTS
# Do everything!
ACTIVE_BRANCHES = BRANCHES.keys()
if 'limit_platforms' in master_config:
    ACTIVE_PLATFORMS = dict((p,None) for p in master_config['limit_platforms'])
else:
    ACTIVE_PLATFORMS = dict((k,None) for k in PLATFORMS.keys())
ACTIVE_PROJECTS = PROJECTS.keys()

QUEUEDIR = master_config.get("queuedir", "/dev/shm/queue")