[PATCH] D68839: [lit] Fix internal diff's --strip-trailing-cr and use it

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 15 17:54:07 PDT 2019


jdenny updated this revision to Diff 225139.
jdenny edited the summary of this revision.
jdenny added a comment.

Rebased onto D68664 <https://reviews.llvm.org/D68664>, which I previously forgot this patch requires.  Otherwise, when using Windows or when using Python 3, a lit test introduced here fails because it expects `\r\n` and `\n` to be different while, when using Windows or Python 3, `\r\n` is read as `\n` in text mode.  D68664 <https://reviews.llvm.org/D68664> reads in binary mode and thus prevents that problem.

Adjusted the commit log not to confuse Python's universal newlines support (the default in Python 3 but not 2), with the `\r\n` -> `\n` behavior of text mode under even Python 2 on Windows.


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

https://reviews.llvm.org/D68839

Files:
  llvm/test/MC/ARM/preserve-comments-arm.s
  llvm/test/MC/AsmParser/preserve-comments.s
  llvm/test/tools/llvm-cxxmap/remap.test
  llvm/test/tools/llvm-profdata/profile-symbol-list.test
  llvm/test/tools/llvm-profdata/roundtrip.test
  llvm/test/tools/llvm-profdata/sample-remap.test
  llvm/utils/lit/lit/TestRunner.py
  llvm/utils/lit/tests/Inputs/shtest-shell/diff-in.dos
  llvm/utils/lit/tests/Inputs/shtest-shell/diff-in.unix
  llvm/utils/lit/tests/Inputs/shtest-shell/diff-strip-trailing-cr.txt
  llvm/utils/lit/tests/max-failures.py
  llvm/utils/lit/tests/shtest-shell.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68839.225139.patch
Type: text/x-patch
Size: 8892 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191016/454ef928/attachment.bin>


More information about the llvm-commits mailing list