Improving email message; adding make TAGS step

This commit is contained in:
Sergio Durigan Junior 2015-01-20 17:06:22 -05:00
parent 1224c5dc50
commit 77dafd9738

View file

@ -143,6 +143,12 @@ send to the gdb-testers mailing list."""
for chg in ss.changes:
text += "\t%s\n" % chg.revision
# Who's to blame?
text += "Author(s) (in the same order as the commits):\n"
for ss in ss_list:
for chg in ss.changes:
text += "\t%s\n" % chg.who
# URL to find more info about what went wrong.
text += "Log URL(s):\n"
for ss in ss_list:
@ -151,39 +157,55 @@ send to the gdb-testers mailing list."""
text += "\t<%s/%s/.git/tree/?id=%s>\n" % (git_url, name, commit_id)
else:
text += "\t<Error fetching commit ID for %s>\n" % ss.revision
# text += "\t<%s/%s/.git/log/?qt=grep&q=%s>\n" % (git_url, name, ss.revision)
# text += "\t<%sresults/%s/%s>\n" % (master_status.getBuildbotURL (), name, ss.revision)
# Who's to blame?
text += "Author(s) (in the same order as the commits):\n"
for ss in ss_list:
for chg in ss.changes:
text += "\t%s\n" % chg.who
# Including the 'regressions' log. This is the 'diff' of what
# went wrong.
text += "\n"
text += "============================\n"
print_xfail = False
for log in build.getLogs ():
if log.getName () == 'regressions':
if not log.hasContents ():
# If the 'regressions' log has no content, it probably
# means that the test failed because of a timeout or
# something. In this case, we just warn.
text += "<< TESTING FAILED (probably timeout) >>\nPlease check the logs on the web\n"
else:
st = log.getStep ()
if st.getResults () == FAILURE:
n = st.getName ()
if n == 'update gdb master repo' or n == 'update gdb repo':
text += "*** Failed to update GDB git repository. This is probably a timeout problem with sourceware. ***\n"
break
elif n == 'configure gdb':
text += "*** Failed to configure GDB. ***\n"
text += "============================\n"
text += log.getText ()
break
text += "============================\n"
text += "============================\n"
break
elif n == 'compile gdb':
text += "*** Failed to compiled GDB. ***\n"
text += "============================\n"
text += log.getText ()
text += "============================\n"
break
elif n == 'make tags':
# We do not want to break here, because if this step
# fails the test will continue.
text += "*** Failed to make TAGS ***\n"
text += "============================\n"
text += log.getText ()
text += "============================\n\n"
continue
elif n == 'regressions' and log.getName () == 'regressions':
text += "*** Regressions found ***\n"
text += "============================\n"
text += log.getText ()
text += "============================\n"
print_xfail = True
break
# Including the 'xfail' log. It is important to say which tests
# we are ignoring.
xfail = os.path.join (gdb_web_base, name, 'xfail')
if os.path.exists (xfail):
text += "\n"
text += "Failures that are being ignored:\n\n"
with open (xfail, 'r') as f:
text += f.read ()
if print_xfail:
xfail = os.path.join (gdb_web_base, name, 'xfail')
if os.path.exists (xfail):
text += "\n"
text += "Failures that are being ignored:\n\n"
with open (xfail, 'r') as f:
text += f.read ()
text += "\n"
return { 'body' : text,
'type' : 'plain',
@ -224,6 +246,7 @@ hack, and is needed because sourceware imposes a load average when one
tries to update more than 3 repositories at the same time. An obvious
FIXME for this would be to have a git mirror somewhere where we could
do more than 3 updates at a time."""
name = "random wait for clone"
description = r"randomly waiting before git fetching"
descriptionDone = r"waited before git fetching"
command = ['sleep', WithProperties (r"%ss", r'randomWait')]
@ -246,6 +269,7 @@ each builder inside a buildslave will have something like:
and so on. This layout helps us to save some when fetching changes
from the principal repository."""
name = "update gdb master repo"
description = r"fetching GDB master sources"
descriptionDone = r"fetched GDB master sources"
def __init__ (self):
@ -264,6 +288,7 @@ be used by an specific builder (inside a buildslave). The trick here
is to use the "reference" parameter to initialize the class, which
makes BuildBot clone the git repository mostly using the objects
present at the reference repository (i.e., locally)."""
name = "clone gdb repo"
description = "fetching GDB sources"
descriptionDone = "fetched GDB sources"
def __init__ (self):
@ -277,6 +302,7 @@ present at the reference repository (i.e., locally)."""
class ConfigureGDB (Configure):
"""This build step runs the GDB "configure" command, providing extra
flags for it if needed."""
name = "configure gdb"
description = r"configure GDB"
descriptionDone = r"configured GDB"
def __init__ (self, extra_conf_flags, **kwargs):
@ -298,6 +324,7 @@ provides extra "make" flags to "make" if needed. It also uses the
compiling GDB; this is the "-j" flag for "make". The value of the
"jobs" property is set at the "config.json" file, for each
buildslave."""
name = "compile gdb"
description = r"compile GDB"
descriptionDone = r"compiled GDB"
def __init__ (self, extra_make_flags = [], **kwargs):
@ -307,12 +334,26 @@ buildslave."""
WithProperties (r"-j%s", r'jobs'),
'all'] + extra_make_flags
class MakeTAGSGDB (ShellCommand):
name = 'make tags'
description = 'running make TAGS'
descriptionDone = 'ran make TAGS'
def __init__ (self, **kwargs):
ShellCommand.__init__ (self, **kwargs)
self.workdir = WithProperties ("%s/build/gdb", 'builddir')
self.command = [ 'make', 'TAGS' ]
# We do not want to stop testing when this command fails.
self.haltOnFailure = False
self.flunkOnFailure = False
self.flunkOnWarnings = False
class TestGDB (ShellCommand):
"""This build step runs the full testsuite for GDB. It can run in
parallel mode (see BuildAndTestGDBFactory below), and it will also
provide any extra flags for "make" if needed. Unfortunately, because
our testsuite is not perfect (yet), this command must not make
BuildBot halt on failure."""
name = "test gdb"
description = r"testing GDB"
descriptionDone = r"tested GDB"
def __init__ (self, extra_make_check_flags = [], test_env = {},
@ -426,6 +467,8 @@ The parameters of the class are:
self.extra_make_flags = []
self.addStep (self.CompileClass (self.extra_make_flags))
self.addStep (MakeTAGSGDB ())
if not self.extra_make_check_flags:
self.extra_make_check_flags = []
if not self.test_env: