Comments and cleanup

This commit is contained in:
Sergio Durigan Junior 2015-06-26 15:47:31 -04:00
parent 78e7fca05f
commit 8a4e0c66dc

View file

@ -32,7 +32,6 @@ from sumfiles import DejaResults, set_web_base
import os.path import os.path
import urllib import urllib
from json import load from json import load
import random
import re import re
#################################### ####################################
@ -806,6 +805,11 @@ class RunTestGDBPlainAIX (RunTestGDBAIX_Common, RunTestGDBPlain_c64t64):
# All branches that are going to be watched. # All branches that are going to be watched.
all_gdb_filter = ChangeFilter (branch_fn = should_watch_branch) all_gdb_filter = ChangeFilter (branch_fn = should_watch_branch)
# This function prevents a builder to build more than one build at the
# same time. This is needed because we do not have a way to lock the
# git repository containing the test results of the builder, so
# simultaneous builds can cause a mess when committing the test
# results.
def DefaultGDBCanStartBuild (builder, buildslave, buildrequest): def DefaultGDBCanStartBuild (builder, buildslave, buildrequest):
return not builder.building return not builder.building
@ -816,6 +820,8 @@ def DefaultGDBfileIsImportant (change):
changes to build on GDB.""" changes to build on GDB."""
only_changelog = True only_changelog = True
# Do not build the 'GDB Administrator' commits, that are used to
# increment the date on some files.
if 'GDB Administrator' in change.who: if 'GDB Administrator' in change.who:
return False return False
@ -823,6 +829,7 @@ changes to build on GDB."""
for filename in change.files: for filename in change.files:
if 'ChangeLog' not in filename: if 'ChangeLog' not in filename:
only_changelog = False only_changelog = False
break
if only_changelog: if only_changelog:
return False return False
@ -847,14 +854,11 @@ def load_config (c):
config = load (open ("lib/config.json")) config = load (open ("lib/config.json"))
passwd = load (open ("lib/passwords.json")) passwd = load (open ("lib/passwords.json"))
random.seed ()
c['slaves'] = [BuildSlave (slave['name'], passwd[slave['name']], c['slaves'] = [BuildSlave (slave['name'], passwd[slave['name']],
max_builds = 1, max_builds = 1,
notify_on_missing = [ str (slave['admin']) ], notify_on_missing = [ str (slave['admin']) ],
missing_timeout = 300, missing_timeout = 300,
properties = { 'jobs' : slave['jobs'], properties = { 'jobs' : slave['jobs'] }
'randomWait' : "%d" % random.randrange (1, 30) })
for slave in config['slaves']] for slave in config['slaves']]
c['schedulers'] = [] c['schedulers'] = []