Improving email report

This commit is contained in:
Sergio Durigan Junior 2015-02-04 23:29:25 -05:00
parent bf89955efc
commit d8f6a87dc7

View file

@ -179,13 +179,14 @@ send to the gdb-testers mailing list."""
# Including the 'regressions' log. This is the 'diff' of what
# went wrong.
text += "\n"
print_xfail = False
found_regressions = False
for log in build.getLogs ():
st = log.getStep ()
if st.getResults ()[0] == FAILURE:
n = st.getName ()
if n == 'update gdb master repo':
text += "*** Failed to update master GDB git repository. The build can continue. ***\n\n"
continue
elif n == 'update gdb repo':
text += "*** Failed to update GDB git repository. This is probably a timeout problem. ***\n\n"
break
@ -213,18 +214,27 @@ send to the gdb-testers mailing list."""
text += "============================\n"
text += log.getText ()
text += "============================\n"
print_xfail = True
found_regressions = True
break
# Including the 'xfail' log. It is important to say which tests
# we are ignoring.
if print_xfail:
if found_regressions:
for log in build.getLogs ():
if log.getStep ().getName () == 'regressions' and log.getName () == 'baseline_diff':
text += "\n\n*** Also, the following failures have been found when comparing to the baseline ***\n"
text += "============================\n"
text += log.getText ()
text += "============================\n"
break
xfail = os.path.join (gdb_web_base, name, 'xfails', branch, 'xfail')
if os.path.exists (xfail):
text += "\n"
text += "Failures that are being ignored:\n\n"
text += "\n\n***Failures that are being ignored:\n"
text += "============================\n"
with open (xfail, 'r') as f:
text += f.read ()
text += "============================\n"
text += "\n"
return { 'body' : text,
'type' : 'plain',