Change count to str
This commit is contained in:
parent
d750aad632
commit
49294d746b
1 changed files with 8 additions and 8 deletions
16
master.cfg
16
master.cfg
|
@ -144,11 +144,11 @@ from email.mime.text import MIMEText
|
|||
def SendRootMessageGDBTesters (branch, change, rev,
|
||||
istrysched = False,
|
||||
try_to = None,
|
||||
try_count = 0):
|
||||
try_count = "0"):
|
||||
global GDB_MAIL_TO, GDB_MAIL_FROM
|
||||
|
||||
if istrysched:
|
||||
f = "/tmp/gdb-buildbot-%s-try-%d.lock" % (rev, try_count)
|
||||
f = "/tmp/gdb-buildbot-%s-try-%s.lock" % (rev, try_count)
|
||||
else:
|
||||
f = "/tmp/gdb-buildbot-%s.lock" % rev
|
||||
|
||||
|
@ -174,17 +174,17 @@ def SendRootMessageGDBTesters (branch, change, rev,
|
|||
text = text.encode ('ascii', 'ignore').decode ('ascii')
|
||||
else:
|
||||
text = ""
|
||||
text += "*** TEST RESULTS FOR TRY BUILD #%d ***\n\n" % try_count
|
||||
text += "*** TEST RESULTS FOR TRY BUILD #%s ***\n\n" % try_count
|
||||
|
||||
text += "Branch: %s\n" % branch
|
||||
text += "Commit tested against: %s\n\n" % rev
|
||||
|
||||
text += "There have been %d tries before this one.\n\n" % try_count
|
||||
text += "There have been %s tries before this one.\n\n" % try_count
|
||||
|
||||
text += "Patch tested:\n\n"
|
||||
text += change
|
||||
|
||||
chg_title = "Try Build #%d against commit %s" % (try_count, rev)
|
||||
chg_title = "Try Build #%s against commit %s" % (try_count, rev)
|
||||
text = text.encode ('ascii', 'ignore').decode ('ascii')
|
||||
|
||||
mail = MIMEText (text)
|
||||
|
@ -449,7 +449,7 @@ send to the gdb-testers mailing list."""
|
|||
try_count = try_count)
|
||||
|
||||
# Subject
|
||||
subj = "Try Build #%d on %s, branch %s" % (try_count, name, branch)
|
||||
subj = "Try Build #%s on %s, branch %s" % (try_count, name, branch)
|
||||
|
||||
# Body
|
||||
text = ""
|
||||
|
@ -469,7 +469,7 @@ send to the gdb-testers mailing list."""
|
|||
|
||||
# URL to find more info about what went wrong.
|
||||
text += "\nTestsuite log (gdb.sum and gdb.log) URL(s):\n"
|
||||
text += "\t<%s/%s/try/%s/%s/%d/>\n\n" % (res_url, name, sourcestamp.revision[:2],
|
||||
text += "\t<%s/%s/try/%s/%s/%s/>\n\n" % (res_url, name, sourcestamp.revision[:2],
|
||||
sourcestamp.revision, try_count)
|
||||
|
||||
# commit_id = get_builder_commit_id (name, sourcestamp.revision,
|
||||
|
@ -797,7 +797,7 @@ class ComputeTryBuildCount (steps.BuildStep):
|
|||
con = sqlite3.connect (db_file)
|
||||
c = con.cursor ()
|
||||
c.execute ('SELECT COUNT(*) FROM logs WHERE commitid = "%s" AND branch = "%s" AND trysched = 1' % (rev, branch))
|
||||
count = c.fetchone ()[0]
|
||||
count = str (c.fetchone ()[0])
|
||||
con.close ()
|
||||
|
||||
self.setProperty ('try_count', count, 'ComputeTryBuildCount')
|
||||
|
|
Loading…
Reference in a new issue