Properly indent console WARN messages that appear inside of START-END
groups. Also, modify the parser to interpret the status of a group as
being the "worst" status message logged in that group, not just
whatever status is associated with the END message.
Signed-off-by: John Admanski <jadmanski@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@1299 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/server/server_job.py b/server/server_job.py
index e76ab3e..a32869b 100755
--- a/server/server_job.py
+++ b/server/server_job.py
@@ -556,7 +556,11 @@
def _format_warnings(self, last_line, warnings):
+ # use the indentation of whatever the last log line was
indent = self.extract_indent.match(last_line).group(1)
+ # if the last line starts a new group, add an extra indent
+ if last_line.lstrip('\t').startswith("START\t"):
+ indent += '\t'
return [self.job._render_record("WARN", None, None, msg,
timestamp, indent).rstrip('\n')
for timestamp, msg in warnings]