Using canStartBuild to limit the number of builds on builders

This commit is contained in:
Sergio Durigan Junior 2015-01-26 23:06:50 -05:00
parent 9aec5417f4
commit 2d4016a156

View file

@ -600,6 +600,9 @@ class RunTestGDBIndexBuildBSD (RunTestGDBIndexBuild, RunTestGDBBSD_Common):
# For now, we only support testing the "master" branch.
all_gdb_filter = ChangeFilter (branch_fn = should_watch_branch)
def DefaultGDBCanStartBuild (builder, buildslave, buildrequest):
return not builder.building
###############################
#### Configuration loading ####
###############################
@ -640,6 +643,7 @@ def load_config (c):
btype = b.pop ('type')
factory = globals ()[ "RunTestGDB%s" % btype ]
b['factory'] = factory (arch_triplet)
b['canStartBuild'] = DefaultGDBCanStartBuild
c['builders'].append (b)
load_config (c)