From: Gerd Hoffmann <kraxel@redhat.com>
To: berendt@b1-systems.de
Cc: qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [buildbot patch 6/6] add log tail to failure reports
Date: Fri, 1 Feb 2013 15:02:25 +0100 [thread overview]
Message-ID: <1359727345-10477-7-git-send-email-kraxel@redhat.com> (raw)
In-Reply-To: <1359727345-10477-1-git-send-email-kraxel@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
qemu-master.cfg | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/qemu-master.cfg b/qemu-master.cfg
index 04d26bf..b54ceb4 100644
--- a/qemu-master.cfg
+++ b/qemu-master.cfg
@@ -45,6 +45,32 @@ emailAddressesNotify = ["gollub@b1-systems.de", "qemu-devel@nongnu.org", "agraf@
####### STATUS TARGETS
+def logtailMessageFormatter(mode, name, build, results, master_status):
+ result = Results[results]
+ defmsg = mail.defaultMessage(mode, name, build, results, master_status);
+ text = list();
+ text.append(defmsg['body']);
+
+ # get log for last step
+ logs = build.getLogs()
+ for log in reversed(logs):
+ if log.getName() == 'stdio':
+ break
+ content = log.getText().splitlines() # Note: can be VERY LARGE
+ url = "%s/steps/%s/logs/%s" % (master_status.getURLForThing(build),
+ log.getStep().getName(),
+ log.getName())
+
+ # append log info to standard message
+ text.append("========== log tail ==========")
+ for line in content[-32:]:
+ text.append(unicode(line,'utf8'))
+ text.append("")
+ text.append("========== full log ==========")
+ text.append(url);
+
+ return { 'body' : "\n".join(text), 'type' : 'plain' }
+
c['status'] = []
from buildbot.status import html
@@ -57,6 +83,7 @@ c['status'].append(
fromaddr=emailAddressFrom,
mode='problem', # only send mail about a build which failed when the previous build passed
extraRecipients=emailAddressesNotify,
+ messageFormatter=logtailMessageFormatter,
sendToInterestedUsers=False
)
)
--
1.7.9.7
prev parent reply other threads:[~2013-02-01 15:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-01 14:02 [Qemu-devel] [buildbot patch 0/6] buildbot update Gerd Hoffmann
2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 1/6] add linebreaks to make create_build_factory more readable Gerd Hoffmann
2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 2/6] make tests configurable Gerd Hoffmann
2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 3/6] fix out-of-tree build Gerd Hoffmann
2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 4/6] use --disable-debug-info Gerd Hoffmann
2013-02-01 14:02 ` [Qemu-devel] [buildbot patch 5/6] save config.log Gerd Hoffmann
2013-02-01 14:02 ` Gerd Hoffmann [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1359727345-10477-7-git-send-email-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=berendt@b1-systems.de \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).