[PATCH] D68225: [LNT] Python 3 support: encode LNT report format in UTF-8
Thomas Preud'homme via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 30 07:03:22 PDT 2019
thopre created this revision.
thopre added reviewers: cmatthews, hubert.reinterpretcast, kristof.beyls.
thopre added a parent revision: D68224: [LNT] Python 3 support: fix text/binary confusion in importreport.
Change encoding of LNT report format to be a UTF-8 JSON file since that
is the only encoding the json module can produce in Python 3. While this
is an incompatible change of the output, the existing import of LNT
report format already expects UTF-8 JSON. Therefore this fixes an import
issue for format produced from there and does not change anything for
already produced format which could not be imported and still cannot be
imported.
https://reviews.llvm.org/D68225
Files:
lnt/testing/__init__.py
Index: lnt/testing/__init__.py
===================================================================
--- lnt/testing/__init__.py
+++ lnt/testing/__init__.py
@@ -94,12 +94,12 @@
'machine': self.machine.render(),
'run': self.run.render(),
'tests': [t.render() for t in self.tests]},
- sort_keys=True, indent=indent, encoding='latin-1')
+ sort_keys=True, indent=indent)
else:
return json.dumps({'Machine': self.machine.render(),
'Run': self.run.render(),
'Tests': [t.render() for t in self.tests]},
- sort_keys=True, indent=indent, encoding='latin-1')
+ sort_keys=True, indent=indent)
class Machine(object):
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68225.222421.patch
Type: text/x-patch
Size: 906 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190930/3d029e80/attachment.bin>
More information about the llvm-commits
mailing list