Fixing the breakage lockfile deletion step

This commit is contained in:
Sergio Durigan Junior 2016-03-01 22:03:29 -05:00
parent 5bd1725ef9
commit 551fa187c3

View file

@ -540,6 +540,25 @@ BuildBot halt on failure."""
self.flunkOnFailure = False
self.flunkOnWarnings = False
class CleanupBreakageLockfile (ShellCommand):
"""Clean up (i.e., remove) the breakage lockfile for a specific builder."""
name = "cleanup breakage lockfile"
description = "cleaning up breakage lockfile"
descriptionDone = "cleaned up breakage lockfile"
command = [ 'true' ]
def __init__ (self, **kwargs):
ShellCommand.__init__ (self, **kwargs)
def evaluateCommand (self, cmd):
builder = self.getProperty ('buildername')
lockfile = "%s%s" % (make_breakage_lockfile_prefix (), builder)
if os.path.isfile (lockfile):
os.remove (lockfile)
return SUCCESS
#######################
#### Build Factory ####
@ -665,12 +684,7 @@ The parameters of the class are:
# This last will be executed when the build succeeds. It is
# needed in order to cleanup the breakage lockfile, if it
# exists.
self.addStep (ShellCommand (command = ['/usr/bin/rm', '-f',
WithProperties ('/tmp/gdb-buildbot-breakage-report-%s',
'buildername')],
description = "cleaning up breakage lockfile (if exists)",
descriptionDone = "cleaned up breakage lockfile",
hideStepIf = True))
self.addStep (CleanupBreakageLockfile (hideStepIf = True))
# Disabling this until we figure out how to properly run + test
# self.addStep (MakeTAGSGDB ())