diff --git a/lldb/test/API/lldbtest.py b/lldb/test/API/lldbtest.py index 94c0588fd9e63..7af4ea7f5b394 100644 --- a/lldb/test/API/lldbtest.py +++ b/lldb/test/API/lldbtest.py @@ -99,6 +99,11 @@ def execute(self, test, litConfig): timeoutInfo = 'Reached timeout of {} seconds'.format( litConfig.maxIndividualTestTime) + if sys.version_info.major == 2: + # In Python 2, string objects can contain Unicode characters. + out = out.decode('utf-8') + err = err.decode('utf-8') + output = """Script:\n--\n%s\n--\nExit Code: %d\n""" % ( ' '.join(cmd), exitCode) if timeoutInfo is not None: