Fix ninja check-lldb

Ninja apparently has issues with commands writing nul characters '\0' to stdout. When it
encounters a nul character, the rest of the output is skipped (I will file a bug with ninja about
that). This breaks the linux buildbot since it parses the ninja check-lldb output to get a list
of failures.

Recently, we have started outputting nul characters in lldb-server tests. This is probably
a bug in itself, but I am not addressing that now. This is just a workaround commit, which
prevents the nul characters from appearing in the output, and gets the buildbot operational again.

llvm-svn: 232805
This commit is contained in:
Pavel Labath 2015-03-20 11:24:36 +00:00
parent 214997c63b
commit 98236e0510
1 changed files with 2 additions and 1 deletions

View File

@ -3,6 +3,7 @@ import re
import select
import threading
import traceback
import codecs
def _handle_output_packet_string(packet_contents):
if (not packet_contents) or (len(packet_contents) < 1):
@ -16,7 +17,7 @@ def _handle_output_packet_string(packet_contents):
def _dump_queue(the_queue):
while not the_queue.empty():
print the_queue.get(True)
print codecs.encode(the_queue.get(True), "string_escape")
print "\n"
class SocketPacketPump(object):