From dceb3a93903366ed0fa6103499e0de1205ab7f8f Mon Sep 17 00:00:00 2001 From: Sergio Durigan Junior Date: Thu, 6 Oct 2016 15:15:32 -0400 Subject: [PATCH] Fixing breakage lockfile error; removing Fedora-x86_64-c-build-m64 from AllBranch scheduler --- lib/config.json | 1 - master.cfg | 24 +++++++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/lib/config.json b/lib/config.json index 7aaa9e1..9f97e1c 100644 --- a/lib/config.json +++ b/lib/config.json @@ -287,7 +287,6 @@ "Fedora-x86_64-native-extended-gdbserver-m32", "Fedora-x86_64-cc-with-index", "Fedora-i686", - "Fedora-x86_64-c-build-m64", "Debian-x86_64-m64", "Debian-x86_64-native-extended-gdbserver-m64", diff --git a/master.cfg b/master.cfg index 469963c..6320802 100644 --- a/master.cfg +++ b/master.cfg @@ -207,10 +207,10 @@ def SendRootMessageGDBTesters (branch, change, rev, s.sendmail (GDB_MAIL_FROM, [ mailto ], mail.as_string ()) s.quit () -def make_breakage_lockfile_prefix (): - return "/tmp/gdb-buildbot-breakage-report-" +def make_breakage_lockfile_name (builder, branch): + 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. 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.""" global GDB_MAIL_FROM - lockfile = "%s%s" % (make_breakage_lockfile_prefix (), name) + lockfile = make_breakage_lockfile_name (name, branch) if os.path.exists (lockfile): # 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] sbj = 'Your commit \'%s\' broke GDB' % title + if branch != 'master': + sbj += ' [%s]' % branch text = "Hello there,\n\n" text += "Your commit:\n\n" @@ -250,6 +252,7 @@ subsequent commits are made after X, by different people.""" mail['Subject'] = sbj mail['From'] = GDB_MAIL_FROM mail['To'] = to + mail['Cc'] = 'gdb-patches@sourceware.org' s = smtplib.SMTP ('localhost') s.sendmail (GDB_MAIL_FROM, [ to ], mail.as_string ()) @@ -399,11 +402,11 @@ send to the gdb-testers mailing list.""" if report_build_breakage: subj += " *** BREAKAGE ***" - SendAuthorMessage (name, cur_change, text) + SendAuthorMessage (name, branch, cur_change, text) else: # There is no build breakage anymore! Yay! Now, let's see if # 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): # We need to clean the lockfile. Garbage-collect it here. os.remove (lockfile) @@ -772,7 +775,8 @@ class CleanupBreakageLockfile (ShellCommand): def evaluateCommand (self, cmd): 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): os.remove (lockfile) @@ -921,11 +925,13 @@ The parameters of the class are: if self.use_system_debuginfo: 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: 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 # needed in order to cleanup the breakage lockfile, if it