aboutsummaryrefslogtreecommitdiffstats
path: root/lib/python2.7/site-packages/autobuilder/Yocto_Message_Formatter.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python2.7/site-packages/autobuilder/Yocto_Message_Formatter.py')
-rw-r--r--lib/python2.7/site-packages/autobuilder/Yocto_Message_Formatter.py79
1 files changed, 0 insertions, 79 deletions
diff --git a/lib/python2.7/site-packages/autobuilder/Yocto_Message_Formatter.py b/lib/python2.7/site-packages/autobuilder/Yocto_Message_Formatter.py
deleted file mode 100644
index 611da1f8..00000000
--- a/lib/python2.7/site-packages/autobuilder/Yocto_Message_Formatter.py
+++ /dev/null
@@ -1,79 +0,0 @@
-'''
-Created on Jun 3, 2013
-
-__author__ = "Elizabeth 'pidge' Flanagan"
-__copyright__ = "Copyright 2013, Intel Corp."
-__credits__ = ["Elizabeth Flanagan"]
-__license__ = "GPL"
-__version__ = "2.0"
-__maintainer__ = "Elizabeth Flanagan"
-__email__ = "pidge@toganlabs.com"
-'''
-#!/usr/bin/python
-from twisted.python import log
-from buildbot.status.builder import Results
-
-def message_formatter(mode, name, build, results, master_status):
- result = Results[results]
- limit_lines = 60
- text = list()
- text.append('<h4>Build status: %s</h4>' % result.upper())
- text.append("Build worker for this Build: <b>%s</b>" % build.getSlavename())
- text.append('<br>')
- if master_status.getURLForThing(build):
- text.append('Complete logs for all build steps: <a href="%s">%s</a>'
- % (master_status.getURLForThing(build),
- master_status.getURLForThing(build))
- )
- text.append('<br>')
- text.append("Build Reason: %s" % build.getReason())
- text.append('<br>')
-
- try:
- build_properties = build.getProperties().asList()
- except:
- pass
- if build_properties:
- text.append("Build Properties:<br>")
- text.append("<ul>")
- for prop in build_properties:
- if str(prop[1]) != '':
- if prop[0] == "BBLAYERS" or prop[0] == "LOCALCONF":
- if prop[0] == 'BBLAYERS':
- text.append('<li>Contents of bblayers.conf (Note. LCONF_VERSION will not show up correctly)<br><code>')
- else:
- text.append('<li>Contents of auto.conf (local.conf for autobuilders)<br><code>')
- lines=prop[1].splitlines()
- for line in lines:
- text.append(line + "<br>")
- text.append('<br></code></li>')
- elif "trigger" not in prop[0] and "ss_" not in prop[0]:
- text.append('<li>' + prop[0] + " : " + str(prop[1])+"</li>")
- text.append('</ul>')
- url = ""
- for log in build.getLogs():
- log_name = "%s.%s" % (log.getStep().getName(), log.getName())
- log_status, dummy = log.getStep().getResults()
- log_body = []
- for line in log.getText().splitlines(): # Note: can be VERY LARGE
- print line
- if "ERROR" in line or "|" in line:
- log_body.append(line)
-
- log_url = '%s/steps/%s/logs/%s' % (master_status.getURLForThing(build),
- log.getStep().getName(),
- log.getName())
-
- if log_status == 2 and log_body:
- text.append('<i>Detailed log of last build step:</i> <a href="%s">%s</a>'
- % (log_url, log_url))
- text.append('<br>')
- text.append('<h4>Last %d lines of "%s" Error log:</h4>' % (limit_lines, log_name))
- text.append('<p>')
- text.append('<br>'.join([line for line in
- log_body[len(log_body)-limit_lines:]]))
- text.append('</p>')
- text.append('<br><br>')
- text.append('<b>-The Yocto BuildBot</b>')
- return {'body': "\n".join(text), 'type': 'html'}
-