Don't record commit id on breakage lockfile
This commit is contained in:
parent
769d20ffcf
commit
a324f18096
1 changed files with 5 additions and 12 deletions
17
master.cfg
17
master.cfg
|
@ -209,8 +209,8 @@ 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_name (builder, branch, commit):
|
def make_breakage_lockfile_name (branch, builder):
|
||||||
return "/tmp/gdb-buildbot-breakage-report-%s-%s-%s" % (commit, branch, builder)
|
return "/tmp/gdb-buildbot-breakage-report-%s-%s" % (branch, builder)
|
||||||
|
|
||||||
def SendAuthorMessage (name, branch, 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.
|
||||||
|
@ -220,19 +220,13 @@ 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, branch, change.revision)
|
lockfile = make_breakage_lockfile_name (branch, 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
|
||||||
# builder to the author.
|
# builder to the author.
|
||||||
return
|
return
|
||||||
|
|
||||||
lock = glob.glob ("/tmp/gdb-buildbot-breakage-report-%s-*" % change.revision)
|
|
||||||
if lock:
|
|
||||||
send_gdb_patches_msg = False
|
|
||||||
else:
|
|
||||||
send_gdb_patches_msg = True
|
|
||||||
|
|
||||||
# This file will be cleaned the next time we run
|
# This file will be cleaned the next time we run
|
||||||
# MessageGDBTesters, iff the build breakage has been fixed.
|
# MessageGDBTesters, iff the build breakage has been fixed.
|
||||||
open (lockfile, 'w').close ()
|
open (lockfile, 'w').close ()
|
||||||
|
@ -262,8 +256,7 @@ subsequent commits are made after X, by different people."""
|
||||||
mail = MIMEText (text)
|
mail = MIMEText (text)
|
||||||
mail['Subject'] = sbj
|
mail['Subject'] = sbj
|
||||||
mail['From'] = 'gdb-buildbot@sergiodj.net'
|
mail['From'] = 'gdb-buildbot@sergiodj.net'
|
||||||
if send_gdb_patches_msg:
|
to += ", gdb-patches@sourceware.org"
|
||||||
to += ", gdb-patches@sourceware.org"
|
|
||||||
mail['To'] = to
|
mail['To'] = to
|
||||||
mail['Reply-To'] = 'gdb-patches@sourceware.org'
|
mail['Reply-To'] = 'gdb-patches@sourceware.org'
|
||||||
|
|
||||||
|
@ -423,7 +416,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, branch, cur_change.revision)
|
lockfile = make_breakage_lockfile_name (branch, 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)
|
||||||
|
|
Loading…
Reference in a new issue