Implementing fileIsImportant feature, which allows us to filter changes
This commit is contained in:
parent
d608255234
commit
8df4c9d129
1 changed files with 16 additions and 0 deletions
16
master.cfg
16
master.cfg
|
@ -598,6 +598,20 @@ all_gdb_filter = ChangeFilter (branch_fn = should_watch_branch)
|
|||
def DefaultGDBCanStartBuild (builder, buildslave, buildrequest):
|
||||
return not builder.building
|
||||
|
||||
tests_accepted_re = re.compile ("(gdb/|bfd/|binutils/).*")
|
||||
|
||||
def DefaultGDBfileIsImportant (change):
|
||||
"""Implementation of fileIsImportant method, in order to decide which
|
||||
changes to build on GDB."""
|
||||
if 'GDB Administrator' in change.who:
|
||||
return False
|
||||
|
||||
for filename in change.files:
|
||||
if re.match (tests_accepted_re, filename):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
###############################
|
||||
#### Configuration loading ####
|
||||
###############################
|
||||
|
@ -613,6 +627,7 @@ def load_config (c):
|
|||
passwd = load (open ("lib/passwords.json"))
|
||||
|
||||
random.seed ()
|
||||
|
||||
c['slaves'] = [BuildSlave (slave['name'], passwd[slave['name']],
|
||||
max_builds = 1,
|
||||
properties = { 'jobs' : slave['jobs'],
|
||||
|
@ -624,6 +639,7 @@ def load_config (c):
|
|||
if "change_filter" in s:
|
||||
s['change_filter'] = globals ()[s['change_filter']]
|
||||
s['treeStableTimer'] = None
|
||||
s['fileIsImportant'] = DefaultGDBfileIsImportant
|
||||
kls = globals ()[s.pop ('type')]
|
||||
s = dict (map (lambda key_value_pair : (str (key_value_pair[0]),
|
||||
key_value_pair[1]),
|
||||
|
|
Loading…
Reference in a new issue