[Lldb-commits] [PATCH] D79645: [lldb/test] Fix for flakiness in TestNSDictionarySynthetic
Vedant Kumar via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon May 11 10:12:22 PDT 2020
This revision was automatically updated to reflect the committed changes.
vsk marked an inline comment as done.
Closed by commit rGf807d0b4acdb: [lldb/test] Fix for flakiness in TestNSDictionarySynthetic (authored by vsk).
Changed prior to commit:
https://reviews.llvm.org/D79645?vs=262927&id=263210#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79645/new/
https://reviews.llvm.org/D79645
Files:
lldb/test/API/lldbtest.py
Index: lldb/test/API/lldbtest.py
===================================================================
--- lldb/test/API/lldbtest.py
+++ lldb/test/API/lldbtest.py
@@ -119,9 +119,14 @@
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')
+ # In Python 2, string objects can contain Unicode characters. Use
+ # the non-strict 'replace' decoding mode. We cannot use the strict
+ # mode right now because lldb's StringPrinter facility and the
+ # Python utf8 decoder have different interpretations of which
+ # characters are "printable". This leads to Python utf8 decoding
+ # exceptions even though lldb is behaving as expected.
+ out = out.decode('utf-8', 'replace')
+ err = err.decode('utf-8', 'replace')
output = """Script:\n--\n%s\n--\nExit Code: %d\n""" % (
' '.join(cmd), exitCode)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79645.263210.patch
Type: text/x-patch
Size: 1089 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200511/f4796084/attachment.bin>
More information about the lldb-commits
mailing list