Index: lldb/test/API/lldbtest.py =================================================================== --- lldb/test/API/lldbtest.py +++ lldb/test/API/lldbtest.py @@ -82,7 +82,7 @@ sys.executable, '-c', 'import sys; print(sys.executable)' - ]).decode('utf-8').strip() + ]).decode('utf-8', errors='ignore').strip() shutil.copy(python, copied_python) cmd[0] = copied_python @@ -99,6 +99,10 @@ timeoutInfo = 'Reached timeout of {} seconds'.format( litConfig.maxIndividualTestTime) + # Decode stdout and stderr as it might contains UTF-8 characters. + out = out.decode('utf-8', errors='ignore') + err = err.decode('utf-8', errors='ignore') + output = """Script:\n--\n%s\n--\nExit Code: %d\n""" % ( ' '.join(cmd), exitCode) if timeoutInfo is not None: