[PATCH] D84233: [lit] Escape ANSI control character in xunit output

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 03:01:12 PDT 2020


arichardson marked an inline comment as done.
arichardson added a comment.

In D84233#2167650 <https://reviews.llvm.org/D84233#2167650>, @yln wrote:

> Thanks for adding a test, we definitely want to keep it!
>
> Implementation: do you think that this is the best approach to solving this issue?  Have you considered other options?
>  Is this a new issue or was this caused by my "report generators" refactoring?


No this issue has been around for a while, I originally added a workaround to our fork in 2018 (https://github.com/CTSRD-CHERI/llvm-project/commit/3179f32c07f224c96d33f485747f508a34106c91).
I'm currently trying to reduce our diff to upstream and cleaning up local workarounds for upstreaming.



================
Comment at: llvm/utils/lit/lit/reports.py:128
             if isinstance(output, bytes):
                 output.decode("utf-8", 'ignore')
+
----------------
yln wrote:
> I just spotted a bug in this existing code, `decode()` returns a new string.  It should be:
> ```
> output = output.decode('utf-8', 'ignore')
> ```
> 
> Can you check if this would resolve your issue?
Good catch. But I don't believe this fixes the issue since those characters are valid utf-8 characters just not ones that the Jenkins JUnit XML parser accepts.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D84233





More information about the llvm-commits mailing list