Sergio Durigan Junior
6c86aad971
Several modifications were necessary. Mainly, the Nightly scheduler has been added. I've also created a new class in order to help detect and notify about the racy testcases found.
42 lines
1.4 KiB
Python
42 lines
1.4 KiB
Python
from buildbot.status.builder import SUCCESS, WARNINGS, FAILURE, EXCEPTION
|
|
from buildbot.steps.shell import ShellCommand
|
|
from sumfiles import DejaResults
|
|
import smtplib
|
|
import socket
|
|
from email.mime.text import MIMEText
|
|
|
|
class GDBAnalyzeRacyTests (ShellCommand):
|
|
"""Analyze the racy tests"""
|
|
command = ['cat', 'racy.sum']
|
|
|
|
def __init__ (self, **kwargs):
|
|
ShellCommand.__init__ (self, **kwargs)
|
|
|
|
def evaluateCommand (self, cmd):
|
|
builder = self.getProperty('buildername')
|
|
branch = self.getProperty('branch')
|
|
|
|
p = DejaResults ()
|
|
|
|
racy_tests = p.read_sum_text (self.getLog ('stdio').getText ())
|
|
xfails = p.read_xfail (builder, branch)
|
|
|
|
unique_tests = racy_tests[1]['NONE'] - xfails[1]['FAIL']
|
|
|
|
msg = "============================\n"
|
|
for t in unique_tests:
|
|
msg += "FAIL: %s\n" % t
|
|
msg += "============================\n"
|
|
|
|
mail = MIMEText (msg)
|
|
mail['Subject'] = 'Failures on %s, branch %s' % (builder, branch)
|
|
mail['From'] = 'GDB BuildBot Racy Detector <gdb-buildbot@sergiodj.net>'
|
|
mail['To'] = 'gdb-buildbot@sergiodj.net'
|
|
|
|
s = smtplib.SMTP ('localhost')
|
|
s.sendmail ('gdb-buildbot@sergiodj.net',
|
|
[ 'GDB BuildBot Racy Detector <gdb-buildbot@sergiodj.net>' ],
|
|
mail.as_string ())
|
|
s.quit ()
|
|
|
|
return SUCCESS
|