[PATCH] D69048: [LNT] Python 3 support: run tests with UTF-8 encoding

Thomas Preud'homme via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 4 08:27:20 PST 2019


thopre updated this revision to Diff 232145.
thopre added a comment.

Unconditionally set LANG in lit environment to host's LANG


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

https://reviews.llvm.org/D69048

Files:
  tests/lit.cfg


Index: tests/lit.cfg
===================================================================
--- tests/lit.cfg
+++ tests/lit.cfg
@@ -33,6 +33,10 @@
 except:
     build_root = ''
 config.environment['PYTHONPATH'] = '%s:%s' % (build_root, src_root)
+# LNT needs a UTF-8 locale when running in Python 3 mode. Rely on the host
+# environment to provide it rather than assume a specific UTF-8 locale is
+# present.
+config.environment['LANG'] = os.environ['LANG']
 # Don't generate .pyc files when running tests.
 config.environment['PYTHONDONTWRITEBYTECODE'] = "1"
 config.environment['SUDO_CMD'] = ""


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69048.232145.patch
Type: text/x-patch
Size: 594 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191204/3117e799/attachment.bin>


More information about the llvm-commits mailing list