Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lldb/test] Fix for flakiness in TestNSDictionarySynthetic #1262

Merged
merged 1 commit into from
May 26, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions lldb/test/API/lldbtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,14 @@ def execute(self, test, litConfig):
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)
Expand Down