Bug 1290114 - Make Android test logging more responsive; r=ahal
authorGeoff Brown <gbrown@mozilla.com>
Fri, 29 Jul 2016 08:29:53 -0600
changeset 349391 e5ae984c685bb798e439fb4ec0bf02b3ab49f8df
parent 349390 4dcce7c669037971a862a39d3a44790523d9c819
child 349392 f7f0a9f0833e0df30eeaf3c0b9ff5152e16b0fda
push id1230
push userjlund@mozilla.com
push dateMon, 31 Oct 2016 18:13:35 +0000
treeherdermozilla-release@5e06e3766db2 [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: