Include last 100 lines in the build breakage log

This commit is contained in:
Sergio Durigan Junior 2015-07-31 14:16:46 -04:00
parent f10d5d0e54
commit fc2e3388f1

View file

@ -313,9 +313,11 @@ send to the gdb-testers mailing list."""
text += "============================\n"
ct = log.getText ().decode ('ascii', 'ignore')
if len (ct) > 100000:
text += "\n+++ The log is too big to be posted here."
text += "\n+++ Please go to the \"Full Build URL\" (link above) to see it."
text += "\n\n"
text += "\n+++ The full log is too big to be posted here."
text += "\n+++ These are the last 100 lines of it.\n\n"
ctt = ct.split ('\n')[-100:]
ct = '\n'.join (ctt)
text += ct
else:
text += ct
text += "============================\n"