Bug 1290114 - Make Android test logging more responsive; r=ahal
authorGeoff Brown <gbrown@mozilla.com>
Fri, 29 Jul 2016 08:29:53 -0600
changeset 347321 e5ae984c685bb798e439fb4ec0bf02b3ab49f8df
parent 347320 4dcce7c669037971a862a39d3a44790523d9c819
child 347322 f7f0a9f0833e0df30eeaf3c0b9ff5152e16b0fda
push id6389
push userraliiev@mozilla.com
push dateMon, 19 Sep 2016 13:38:22 +0000
treeherdermozilla-beta@01d67bfe6c81 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersahal
bugs1290114
milestone50.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1290114 - Make Android test logging more responsive; r=ahal
build/mobile/remoteautomation.py
--- a/build/mobile/remoteautomation.py
+++ b/build/mobile/remoteautomation.py
@@ -340,19 +340,23 @@ class RemoteAutomation(Automation):
                 print newLogContent
                 return True
 
             self.logBuffer += newLogContent
             lines = self.logBuffer.split('\n')
             lines = [l for l in lines if l]
 
             if lines:
-                # We only keep the last (unfinished) line in the buffer
-                self.logBuffer = lines[-1]
-                del lines[-1]
+                if self.logBuffer.endswith('\n'):
+                    # all lines are complete; no need to buffer
+                    self.logBuffer = ""
+                else:
+                    # keep the last (unfinished) line in the buffer
+                    self.logBuffer = lines[-1]
+                    del lines[-1]
 
             if not lines:
                 return False
 
             for line in lines:
                 # This passes the line to the logger (to be logged or buffered)
                 parsed_messages = self.messageLogger.write(line)
                 for message in parsed_messages: