[PATCH] D68664: [lit] Clean up internal diff's encoding handling
Joel E. Denny via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 13:56:22 PDT 2019
jdenny created this revision.
jdenny added reviewers: probinson, stella.stamenova, bd1976llvm, jlpeyton, rnk, mgorny.
Herald added a subscriber: delcypher.
Herald added a project: LLVM.
jdenny added a parent revision: D66574: [lit] Make internal diff work in pipelines.
jdenny added a child revision: D67643: [lit] Extend internal diff to support `-` argument.
As suggested by rnk at D67643#1673043 <https://reviews.llvm.org/D67643#1673043>, instead of reading files
multiple times until an appropriate encoding is found, read them once
as binary, and then try to decode what was read.
For python >= 3.5, don't fail when attempting to decode the
`diff_bytes` output in order to print it.
Finally, add some tests for encoding handling.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D68664
Files:
llvm/utils/lit/lit/builtin_commands/diff.py
llvm/utils/lit/tests/Inputs/shtest-shell/diff-encodings.txt
llvm/utils/lit/tests/Inputs/shtest-shell/diff-in.bin
llvm/utils/lit/tests/Inputs/shtest-shell/diff-in.utf16
llvm/utils/lit/tests/Inputs/shtest-shell/diff-in.utf8
llvm/utils/lit/tests/max-failures.py
llvm/utils/lit/tests/shtest-shell.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68664.223935.patch
Type: text/x-patch
Size: 6172 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191008/e08a3e16/attachment.bin>
More information about the llvm-commits
mailing list