JDevlieghere updated this revision to Diff 253229.
JDevlieghere added a comment.
Use single quotes for consistency
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76955/new/
https://reviews.llvm.org/D76955
Files:
lldb/test/API/lldbtest.py
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:
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:
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits