[LNT] r373218 - [LNT] Python 3 support: encode LNT report format in UTF-8

Thomas Preud'homme via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 30 08:08:00 PDT 2019


Author: thopre
Date: Mon Sep 30 08:08:00 2019
New Revision: 373218

URL: http://llvm.org/viewvc/llvm-project?rev=373218&view=rev
Log:
[LNT] Python 3 support: encode LNT report format in UTF-8

Summary:
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.

Reviewers: cmatthews, hubert.reinterpretcast, kristof.beyls

Reviewed By: hubert.reinterpretcast

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D68225

Modified:
    lnt/trunk/lnt/testing/__init__.py

Modified: lnt/trunk/lnt/testing/__init__.py
URL: http://llvm.org/viewvc/llvm-project/lnt/trunk/lnt/testing/__init__.py?rev=373218&r1=373217&r2=373218&view=diff
==============================================================================
--- lnt/trunk/lnt/testing/__init__.py (original)
+++ lnt/trunk/lnt/testing/__init__.py Mon Sep 30 08:08:00 2019
@@ -93,12 +93,12 @@ class Report:
                                '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:




More information about the llvm-commits mailing list