[Buildbot] #3144: stdio display is messed up with some compiler outputs
Buildbot trac
trac at buildbot.net
Sat Jan 10 23:46:19 UTC 2015
#3144: stdio display is messed up with some compiler outputs
----------------------+------------------------
Reporter: ewong | Owner:
Type: undecided | Status: new
Priority: minor | Milestone: undecided
Version: master | Resolution:
Keywords: |
----------------------+------------------------
Comment (by dustin):
The log code is incorrectly ignoring the `\r` in the windows `\r\n`, but
this really shouldn't make a difference: it's just a trailing control
character on each line.
What's really weird is, most of the output lines are missing the `o`
prefix. I can't figure out why that'd be the case. This test case
passes:
{{{
#!patch
diff --git a/master/buildbot/test/unit/test_process_log.py
b/master/buildbot/test/unit/test_process_log.py
index bb9c719..b3c698b 100644
--- a/master/buildbot/test/unit/test_process_log.py
+++ b/master/buildbot/test/unit/test_process_log.py
@@ -174,16 +174,31 @@ class Tests(unittest.TestCase):
'content': [u'ohello\n', u'eoh noes!\n', u'ohello cruel
world\n',
u'ebad things!\n'],
'finished': True,
'name': u'testlog',
'type': u's',
})
@defer.inlineCallbacks
+ def test_updates_windows_newlines(self):
+ l = yield self.makeLog('s')
+
+ l.addStdout(u'hello\r\ncruel\r\nwo')
+ l.addStdout('rld\r\n')
+ l.finish()
+
+ self.assertEqual(self.master.data.updates.logs[l.logid], {
+ 'content': [u'ohello\r\nocruel\r\n', u'oworld\r\n'],
+ 'finished': True,
+ 'name': u'testlog',
+ 'type': u's',
+ })
+
+ @defer.inlineCallbacks
def test_isFinished(self):
l = yield self.makeLog('s')
self.assertFalse(l.isFinished())
yield l.finish()
self.assertTrue(l.isFinished())
@defer.inlineCallbacks
def test_waitUntilFinished(self):
}}}
including inserting an 'o' between 'hello' and 'cruel'.
--
Ticket URL: <http://trac.buildbot.net/ticket/3144#comment:7>
Buildbot <http://buildbot.net/>
Buildbot: build/test automation
More information about the bugs
mailing list