Always delete breakage lockfile if build succeeds
This commit is contained in:
parent
52e6cb7df1
commit
5bd1725ef9
1 changed files with 14 additions and 4 deletions
18
master.cfg
18
master.cfg
|
@ -178,8 +178,8 @@ def SendRootMessageGDBTesters (branch, change):
|
||||||
s.sendmail (GDB_MAIL_FROM, [ GDB_MAIL_TO ], mail.as_string ())
|
s.sendmail (GDB_MAIL_FROM, [ GDB_MAIL_TO ], mail.as_string ())
|
||||||
s.quit ()
|
s.quit ()
|
||||||
|
|
||||||
def make_breakage_lockfile_name (builder):
|
def make_breakage_lockfile_prefix ():
|
||||||
return "/tmp/gdb-buildbot-breakage-report-%s" % builder
|
return "/tmp/gdb-buildbot-breakage-report-"
|
||||||
|
|
||||||
def SendAuthorMessage (name, change, text_prepend):
|
def SendAuthorMessage (name, change, text_prepend):
|
||||||
"""Send a message to the author of the commit if it broke GDB.
|
"""Send a message to the author of the commit if it broke GDB.
|
||||||
|
@ -189,7 +189,7 @@ people. This may happen, for example, if a commit X breaks GDB, but
|
||||||
subsequent commits are made after X, by different people."""
|
subsequent commits are made after X, by different people."""
|
||||||
global GDB_MAIL_FROM
|
global GDB_MAIL_FROM
|
||||||
|
|
||||||
lockfile = make_breakage_lockfile_name (name)
|
lockfile = "%s%s" % (make_breakage_lockfile_prefix (), name)
|
||||||
|
|
||||||
if os.path.exists (lockfile):
|
if os.path.exists (lockfile):
|
||||||
# This means we have already reported this failure for this
|
# This means we have already reported this failure for this
|
||||||
|
@ -374,7 +374,7 @@ send to the gdb-testers mailing list."""
|
||||||
else:
|
else:
|
||||||
# There is no build breakage anymore! Yay! Now, let's see if
|
# There is no build breakage anymore! Yay! Now, let's see if
|
||||||
# we need to clean up any lock file from previous breaks.
|
# we need to clean up any lock file from previous breaks.
|
||||||
lockfile = make_breakage_lockfile_name (name)
|
lockfile = "%s%s" % (make_breakage_lockfile_prefix (), name)
|
||||||
if os.path.exists (lockfile):
|
if os.path.exists (lockfile):
|
||||||
# We need to clean the lockfile. Garbage-collect it here.
|
# We need to clean the lockfile. Garbage-collect it here.
|
||||||
os.remove (lockfile)
|
os.remove (lockfile)
|
||||||
|
@ -662,6 +662,16 @@ The parameters of the class are:
|
||||||
self.extra_make_flags = []
|
self.extra_make_flags = []
|
||||||
self.addStep (self.CompileClass (self.make_command, self.extra_make_flags))
|
self.addStep (self.CompileClass (self.make_command, self.extra_make_flags))
|
||||||
|
|
||||||
|
# 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))
|
||||||
|
|
||||||
# Disabling this until we figure out how to properly run + test
|
# Disabling this until we figure out how to properly run + test
|
||||||
# self.addStep (MakeTAGSGDB ())
|
# self.addStep (MakeTAGSGDB ())
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue