Lots of fixes on gdbgitdb and other places

This commit is contained in:
Sergio Durigan Junior 2014-12-22 22:29:12 -05:00
parent 555c6db4b0
commit bf97593525
3 changed files with 12 additions and 13 deletions

View file

@ -1,5 +1,6 @@
# DB-like with git
from buildbot.status.builder import SUCCESS, WARNINGS, FAILURE, EXCEPTION
from buildbot.steps.shell import ShellCommand
from sumfiles import get_web_base
import os.path
@ -12,7 +13,7 @@ class SaveGDBResults (ShellCommand):
command = ['true']
def __init__ (self, **kwargs):
BuildStep.__init__ (self, **kwargs)
ShellCommand.__init__ (self, **kwargs)
def evaluateCommand (self, cmd):
rev = self.getProperty ('got_revision')
@ -25,11 +26,9 @@ class SaveGDBResults (ShellCommand):
if istry and istry == 'yes':
# Do nothing
return SUCCESS
try:
repo = git.Repo (path = repodir)
except git.InvalidGitRepositoryError:
repo = git.Repo.init (path = repodir)
git.index.add (['gdb.sum', 'gdb.log', '%s/baseline' % branch])
git.index.commit ('Log files for %s' % rev)
git.create_tag (rev)
repo.index.add (['gdb.sum', 'gdb.log', '%s/baseline' % branch])
repo.index.commit ('Log files for %s' % rev)
repo.create_tag (rev)
repo.index.write ()
return SUCCESS

View file

@ -66,7 +66,7 @@ class DejaResults(object):
self._write_sum_file(sum_dict, builder, filename, False)
def write_baseline(self, sum_dict, builder, branch):
self.write_sum_file(sum_dict, os.path.join(builder, branch),
self._write_sum_file(sum_dict, os.path.join(builder, branch),
'baseline', True)
# Read a .sum file.
@ -92,7 +92,7 @@ class DejaResults(object):
return result
def read_sum_file (self, builder, filename):
return self._read_sum_file (self, builder, filename, False)
return self._read_sum_file (builder, filename, False)
def read_baseline(self, builder, branch):
return self._read_sum_file(builder, os.path.join(branch, 'baseline'), True)
@ -113,7 +113,7 @@ class DejaResults(object):
our_keys = results.keys()
our_keys.sort()
result = ''
xfails = self.read_sum_file(builder, 'xfail', False)
xfails = self.read_sum_file(builder, 'xfail')
if xfails is None:
xfails = {}
for key in our_keys:

View file

@ -64,8 +64,8 @@ c['change_source'] = []
c['change_source'].append(GitPoller(
repourl = 'git://sourceware.org/git/binutils-gdb.git',
workdir = '/home/buildbot/buildbot-master-binutils-gdb',
branches= [ 'master' ],
pollinterval=30))
branches = [ 'master' ],
pollinterval = 60 * 3))
# 'status' is a list of Status Targets. The results of each build will be
# pushed to these targets. buildbot/status/*.py has a variety to choose from,