The binary-mode writing to stdout can probably be written in different
ways - even though it's not as elegant as the original.
Details
- Reviewers
ldionne - Group Reviewers
Restricted Project - Commits
- rG8a002ab99eea: [libcxx] [test] Fix the transitive_includes test on Windows
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
LGTM but the writing in binary mode looks really arcane, I'd like to understand why it's needed.
libcxx/test/libcxx/transitive_includes.sanitize.py | ||
---|---|---|
38 | Can you explain what's the problem with the original version? |
libcxx/test/libcxx/transitive_includes.sanitize.py | ||
---|---|---|
38 | The original version writes it as a text stream, so it gets \r\n newlines, which compares as different in the comparisons below. As an alternative, we could also update the templates for generating the autogenerated parts, and making it call diff -w which ignores whitespace differences, which also should fix the issue. |
Removed kludgy code for writing to stdout in binary mode in python, switched to using diff -w for a whitespace-insensitive comparison.
FWIW the only test failure in CI seems to be entirely unrelated to this, so if this seems ok I'll go ahead and push it later today, as this was what was discussed with Louis on discord.
Can you explain what's the problem with the original version?