Improving email message when testing failed (probably because of timeout)

This commit is contained in:
Sergio Durigan Junior 2014-12-23 23:50:41 -05:00
parent 27125d82ae
commit bba18fb712

View file

@ -146,10 +146,18 @@ send to the gdb-testers mailing list."""
# Including the 'regressions' log. This is the 'diff' of what
# went wrong.
text += "\n"
text += "============================\n"
for log in build.getLogs ():
if log.getName () == 'regressions' and log.hasContents ():
text += log.getText ()
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:
text += log.getText ()
break
text += "============================\n"
# Including the 'xfail' log. It is important to say which tests
# we are ignoring.