Skip to content

Commit 150d68e

Browse files
authored
Merge pull request #1101 from JDevlieghere/🍒/20200108/2de52422acf04662b45599f77c14ce1b2cec2b81
[lldb/Test] Decode stdout and stderr in case it contains Unicode.
2 parents b7867f6 + 87b6ab2 commit 150d68e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

‎lldb/test/API/lldbtest.py

+5
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,11 @@ def execute(self, test, litConfig):
9999
timeoutInfo = 'Reached timeout of {} seconds'.format(
100100
litConfig.maxIndividualTestTime)
101101

102+
if sys.version_info.major == 2:
103+
# In Python 2, string objects can contain Unicode characters.
104+
out = out.decode('utf-8')
105+
err = err.decode('utf-8')
106+
102107
output = """Script:\n--\n%s\n--\nExit Code: %d\n""" % (
103108
' '.join(cmd), exitCode)
104109
if timeoutInfo is not None:

0 commit comments

Comments
 (0)