[libcxx-commits] [libcxx] [libcxx][lit] Fixing libcxx test failures on Windows (PR #194752)
via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Apr 30 23:29:46 PDT 2026
zeroomega wrote:
> I took a look at the changes. Using `os.linesep` is not a good idea I think, because the line endings could be unix-style on Windows either. Probably removing of the line endings (both styles) before checking will be more optimal. Something like this:
>
> ```
> self.assertEqual(f"{output2}".rstrip(), "MACRO=2")
> ```
>
> instead of
>
> ```
> self.assertEqual(output2, "MACRO=2%s" % os.linesep)
> ```
>
> `rstrip()` removes all trailing whitespaces including \r \n. To keep the whitespaces, it is possible to use `.replace("\n", "").replace("\r", "")` instead.
Those two tests were testing line breaking behaviors.
So you basically removed what the tests were testing.
I think the correct way is to determine the target's line breakers first, then comparing them. But I don't have a very good solution right now. So I propose to temporarily disable the test while we can have some time to think it over.
https://github.com/llvm/llvm-project/pull/194752
More information about the libcxx-commits
mailing list