2011-11-12 18:20:07 +00:00
|
|
|
"""
|
|
|
|
This module contains the logic which returns the set of
|
|
|
|
schedulers to use for the build master.
|
|
|
|
"""
|
|
|
|
|
2011-11-12 21:18:19 +00:00
|
|
|
from buildbot.changes.filter import ChangeFilter
|
2011-11-14 04:57:51 +00:00
|
|
|
from buildbot.schedulers.basic import (
|
|
|
|
Dependent,
|
|
|
|
SingleBranchScheduler)
|
2011-11-12 21:18:19 +00:00
|
|
|
|
2011-11-20 05:30:51 +00:00
|
|
|
def get_schedulers(builders):
|
2011-11-23 07:07:33 +00:00
|
|
|
platforms = ["linux", "osx", "win"]
|
|
|
|
schedulers = []
|
2011-11-13 00:51:00 +00:00
|
|
|
|
2011-11-23 07:07:33 +00:00
|
|
|
for platform in platforms:
|
|
|
|
platform_builders = [b for b in builders if platform in b.name]
|
2011-11-14 04:57:51 +00:00
|
|
|
|
2011-11-23 07:07:33 +00:00
|
|
|
# Unit tests for this platform
|
|
|
|
unit_builders = [b.name for b in platform_builders if "unit" in b.name]
|
|
|
|
master_unit = SingleBranchScheduler(name="%s-master-unit" % platform,
|
|
|
|
change_filter=ChangeFilter(branch="master"),
|
|
|
|
treeStableTimer=60,
|
|
|
|
builderNames=unit_builders)
|
|
|
|
|
|
|
|
acceptance_builders = [b.name for b in platform_builders if "acceptance" in b.name]
|
|
|
|
master_acceptance = Dependent(name="%s-master-acceptance" % platform,
|
|
|
|
upstream=master_unit,
|
|
|
|
builderNames=acceptance_builders)
|
|
|
|
|
|
|
|
schedulers.extend([master_unit, master_acceptance])
|
|
|
|
|
|
|
|
return schedulers
|