From bf97593525c29847cf1a5f64c6961c001e29d1c6 Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Mon, 22 Dec 2014 22:29:12 -0500 Subject: [PATCH] Lots of fixes on gdbgitdb and other places --- lib/gdbgitdb.py | 15 +++++++-------- lib/sumfiles.py | 6 +++--- master.cfg | 4 ++-- 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/lib/gdbgitdb.py b/lib/gdbgitdb.py index 5a0e53b..672e837 100644 --- a/lib/gdbgitdb.py +++ b/lib/gdbgitdb.py @@ -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 = git.Repo.init (path = repodir) + 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 diff --git a/lib/sumfiles.py b/lib/sumfiles.py index 173f100..f1fee10 100644 --- a/lib/sumfiles.py +++ b/lib/sumfiles.py @@ -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: diff --git a/master.cfg b/master.cfg index 76c8e07..ad005ab 100644 --- a/master.cfg +++ b/master.cfg @@ -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,