[libcxx-commits] [PATCH] D129428: [libcxx] [test] Fix the transitive_includes test on Windows
Martin Storsjö via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Aug 18 13:36:08 PDT 2022
mstorsjo added inline comments.
================
Comment at: libcxx/test/libcxx/transitive_includes.sanitize.py:38-41
+# Write the output to stdout in binary mode, with '\n' linebreaks on all
+# platforms.
+sys.stdout.buffer.write(bytes('\n'.join(sorted(set(headers))), 'ascii'))
+sys.stdout.buffer.write(b'\n')
----------------
ldionne wrote:
> Can you explain what's the problem with the original version?
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.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129428/new/
https://reviews.llvm.org/D129428
More information about the libcxx-commits
mailing list