Lots of fixes on gdbgitdb and other places
This commit is contained in:
parent
555c6db4b0
commit
bf97593525
3 changed files with 12 additions and 13 deletions
|
@ -1,5 +1,6 @@
|
||||||
# DB-like with git
|
# DB-like with git
|
||||||
|
|
||||||
|
from buildbot.status.builder import SUCCESS, WARNINGS, FAILURE, EXCEPTION
|
||||||
from buildbot.steps.shell import ShellCommand
|
from buildbot.steps.shell import ShellCommand
|
||||||
from sumfiles import get_web_base
|
from sumfiles import get_web_base
|
||||||
import os.path
|
import os.path
|
||||||
|
@ -12,7 +13,7 @@ class SaveGDBResults (ShellCommand):
|
||||||
command = ['true']
|
command = ['true']
|
||||||
|
|
||||||
def __init__ (self, **kwargs):
|
def __init__ (self, **kwargs):
|
||||||
BuildStep.__init__ (self, **kwargs)
|
ShellCommand.__init__ (self, **kwargs)
|
||||||
|
|
||||||
def evaluateCommand (self, cmd):
|
def evaluateCommand (self, cmd):
|
||||||
rev = self.getProperty ('got_revision')
|
rev = self.getProperty ('got_revision')
|
||||||
|
@ -25,11 +26,9 @@ class SaveGDBResults (ShellCommand):
|
||||||
if istry and istry == 'yes':
|
if istry and istry == 'yes':
|
||||||
# Do nothing
|
# Do nothing
|
||||||
return SUCCESS
|
return SUCCESS
|
||||||
try:
|
|
||||||
repo = git.Repo (path = repodir)
|
|
||||||
except git.InvalidGitRepositoryError:
|
|
||||||
repo = git.Repo.init (path = repodir)
|
repo = git.Repo.init (path = repodir)
|
||||||
git.index.add (['gdb.sum', 'gdb.log', '%s/baseline' % branch])
|
repo.index.add (['gdb.sum', 'gdb.log', '%s/baseline' % branch])
|
||||||
git.index.commit ('Log files for %s' % rev)
|
repo.index.commit ('Log files for %s' % rev)
|
||||||
git.create_tag (rev)
|
repo.create_tag (rev)
|
||||||
|
repo.index.write ()
|
||||||
return SUCCESS
|
return SUCCESS
|
||||||
|
|
|
@ -66,7 +66,7 @@ class DejaResults(object):
|
||||||
self._write_sum_file(sum_dict, builder, filename, False)
|
self._write_sum_file(sum_dict, builder, filename, False)
|
||||||
|
|
||||||
def write_baseline(self, sum_dict, builder, branch):
|
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)
|
'baseline', True)
|
||||||
|
|
||||||
# Read a .sum file.
|
# Read a .sum file.
|
||||||
|
@ -92,7 +92,7 @@ class DejaResults(object):
|
||||||
return result
|
return result
|
||||||
|
|
||||||
def read_sum_file (self, builder, filename):
|
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):
|
def read_baseline(self, builder, branch):
|
||||||
return self._read_sum_file(builder, os.path.join(branch, 'baseline'), True)
|
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 = results.keys()
|
||||||
our_keys.sort()
|
our_keys.sort()
|
||||||
result = ''
|
result = ''
|
||||||
xfails = self.read_sum_file(builder, 'xfail', False)
|
xfails = self.read_sum_file(builder, 'xfail')
|
||||||
if xfails is None:
|
if xfails is None:
|
||||||
xfails = {}
|
xfails = {}
|
||||||
for key in our_keys:
|
for key in our_keys:
|
||||||
|
|
|
@ -64,8 +64,8 @@ c['change_source'] = []
|
||||||
c['change_source'].append(GitPoller(
|
c['change_source'].append(GitPoller(
|
||||||
repourl = 'git://sourceware.org/git/binutils-gdb.git',
|
repourl = 'git://sourceware.org/git/binutils-gdb.git',
|
||||||
workdir = '/home/buildbot/buildbot-master-binutils-gdb',
|
workdir = '/home/buildbot/buildbot-master-binutils-gdb',
|
||||||
branches= [ 'master' ],
|
branches = [ 'master' ],
|
||||||
pollinterval=30))
|
pollinterval = 60 * 3))
|
||||||
|
|
||||||
# 'status' is a list of Status Targets. The results of each build will be
|
# '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,
|
# pushed to these targets. buildbot/status/*.py has a variety to choose from,
|
||||||
|
|
Loading…
Reference in a new issue