From fb0b3bf49afda1addee22e034e81a5f4dabd56ff Mon Sep 17 00:00:00 2001 From: "bhearsum%mozilla.com" Date: Mon, 9 Jun 2008 15:38:05 +0000 Subject: [PATCH] backout of bug 433874 (m-c tbox logs don't show commands) - because it caused bug 438002. git-svn-id: svn://10.0.0.236/trunk@252195 18797224-902f-48f8-a5cc-f745e15eee43 --- .../buildbot/buildbot/status/tinderbox.py | 39 +++++++------------ 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/mozilla/tools/buildbot/buildbot/status/tinderbox.py b/mozilla/tools/buildbot/buildbot/status/tinderbox.py index 550ddfd88f9..c6984ddef2e 100644 --- a/mozilla/tools/buildbot/buildbot/status/tinderbox.py +++ b/mozilla/tools/buildbot/buildbot/status/tinderbox.py @@ -10,7 +10,7 @@ from buildbot.status import mail from buildbot.status.builder import SUCCESS, WARNINGS from buildbot.steps.shell import WithProperties -import zlib, bz2, base64, re +import zlib, bz2, base64 # TODO: docs, maybe a test of some sort just to make sure it actually imports # and can format email without raising an exception. @@ -187,30 +187,19 @@ class TinderboxMailNotifier(mail.MailNotifier): # logs will always be appended logEncoding = "" tinderboxLogs = "" - for bs in build.getSteps(): - # ignore steps that haven't happened - shortText = ' '.join(bs.getText()) + '\n' - if not re.match(".*[^\s].*", shortText): - continue - logs = bs.getLogs() - - tinderboxLogs += "======== BuildStep started ========\n" - tinderboxLogs += shortText - tinderboxLogs += "=== Output ===\n" - for log in logs: - tinderboxLogs += log.getTextWithHeaders() - - tinderboxLogs += "=== Output ended ===\n" - tinderboxLogs += "======== BuildStep ended ========\n" - - if self.logCompression == "bzip2": - cLog = bz2.compress(tinderboxLogs) - tinderboxLogs = base64.encodestring(cLog) - logEncoding = "base64"; - elif self.logCompression == "gzip": - cLog = zlib.compress(tinderboxLogs) - tinderboxLogs = base64.encodestring(cLog) - logEncoding = "base64"; + for log in build.getLogs(): + l = "" + if self.logCompression == "bzip2": + compressedLog = bz2.compress(log.getText()) + l = base64.encodestring(compressedLog) + logEncoding = "base64"; + elif self.logCompression == "gzip": + compressedLog = zlib.compress(log.getText()) + l = base64.encodestring(compressedLog) + logEncoding = "base64"; + else: + l = log.getText() + tinderboxLogs += l text += "%s logencoding: %s\n" % (t, logEncoding) text += "%s END\n\n" % t