Fixing breakage lockfile error; removing Fedora-x86_64-c-build-m64 from AllBranch scheduler

This commit is contained in:
Sergio Durigan Junior 2016-10-06 15:15:32 -04:00
parent 30ed84c0d7
commit dceb3a9390
2 changed files with 15 additions and 10 deletions

View file

@ -287,7 +287,6 @@
"Fedora-x86_64-native-extended-gdbserver-m32", "Fedora-x86_64-native-extended-gdbserver-m32",
"Fedora-x86_64-cc-with-index", "Fedora-x86_64-cc-with-index",
"Fedora-i686", "Fedora-i686",
"Fedora-x86_64-c-build-m64",
"Debian-x86_64-m64", "Debian-x86_64-m64",
"Debian-x86_64-native-extended-gdbserver-m64", "Debian-x86_64-native-extended-gdbserver-m64",

View file

@ -207,10 +207,10 @@ def SendRootMessageGDBTesters (branch, change, rev,
s.sendmail (GDB_MAIL_FROM, [ mailto ], mail.as_string ()) s.sendmail (GDB_MAIL_FROM, [ mailto ], mail.as_string ())
s.quit () s.quit ()
def make_breakage_lockfile_prefix (): def make_breakage_lockfile_name (builder, branch):
return "/tmp/gdb-buildbot-breakage-report-" return "/tmp/gdb-buildbot-breakage-report-%s-%s" % (branch, builder)
def SendAuthorMessage (name, change, text_prepend): def SendAuthorMessage (name, branch, 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.
We use a lock file to avoid reporting the breakage to different We use a lock file to avoid reporting the breakage to different
@ -218,7 +218,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 = "%s%s" % (make_breakage_lockfile_prefix (), name) lockfile = make_breakage_lockfile_name (name, branch)
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
@ -234,6 +234,8 @@ subsequent commits are made after X, by different people."""
title = change.comments.split ('\n')[0] title = change.comments.split ('\n')[0]
sbj = 'Your commit \'%s\' broke GDB' % title sbj = 'Your commit \'%s\' broke GDB' % title
if branch != 'master':
sbj += ' [%s]' % branch
text = "Hello there,\n\n" text = "Hello there,\n\n"
text += "Your commit:\n\n" text += "Your commit:\n\n"
@ -250,6 +252,7 @@ subsequent commits are made after X, by different people."""
mail['Subject'] = sbj mail['Subject'] = sbj
mail['From'] = GDB_MAIL_FROM mail['From'] = GDB_MAIL_FROM
mail['To'] = to mail['To'] = to
mail['Cc'] = 'gdb-patches@sourceware.org'
s = smtplib.SMTP ('localhost') s = smtplib.SMTP ('localhost')
s.sendmail (GDB_MAIL_FROM, [ to ], mail.as_string ()) s.sendmail (GDB_MAIL_FROM, [ to ], mail.as_string ())
@ -399,11 +402,11 @@ send to the gdb-testers mailing list."""
if report_build_breakage: if report_build_breakage:
subj += " *** BREAKAGE ***" subj += " *** BREAKAGE ***"
SendAuthorMessage (name, cur_change, text) SendAuthorMessage (name, branch, cur_change, text)
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 = "%s%s" % (make_breakage_lockfile_prefix (), name) lockfile = make_breakage_lockfile_name (name, branch)
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)
@ -772,7 +775,8 @@ class CleanupBreakageLockfile (ShellCommand):
def evaluateCommand (self, cmd): def evaluateCommand (self, cmd):
builder = self.getProperty ('buildername') builder = self.getProperty ('buildername')
lockfile = "%s%s" % (make_breakage_lockfile_prefix (), builder) branch = self.getProperty ('branch')
lockfile = make_breakage_lockfile_name (builder, branch)
if os.path.isfile (lockfile): if os.path.isfile (lockfile):
os.remove (lockfile) os.remove (lockfile)
@ -921,11 +925,13 @@ The parameters of the class are:
if self.use_system_debuginfo: if self.use_system_debuginfo:
self.extra_conf_flags.append (r'--with-separate-debug-dir=/usr/lib/debug') self.extra_conf_flags.append (r'--with-separate-debug-dir=/usr/lib/debug')
self.addStep (self.ConfigureClass (self.extra_conf_flags + architecture_triplet)) self.addStep (self.ConfigureClass (self.extra_conf_flags + architecture_triplet),
haltOnFailure = True)
if not self.extra_make_flags: if not self.extra_make_flags:
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),
haltOnFailure = True)
# This last will be executed when the build succeeds. It is # This last will be executed when the build succeeds. It is
# needed in order to cleanup the breakage lockfile, if it # needed in order to cleanup the breakage lockfile, if it