[PATCH] D63254: [lit] Fix UnicodeEncodeError when test commands contain non-ASCII chars

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 13 10:23:41 PDT 2019


rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.

lgtm



================
Comment at: llvm/utils/lit/lit/TestRunner.py:1139
+        mode += 'b'  # Avoid CRLFs when writing bash scripts.
+    elif sys.version_info > (3,0):
+        open_kwargs['encoding'] = 'utf-8'
----------------
I was thinking perhaps this should be `if` not `elif`, but I've run the ELF LLD test suite successfully on Windows with Python 3 and it works fine as is.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63254/new/

https://reviews.llvm.org/D63254





More information about the llvm-commits mailing list