[PATCH] D27701: [lit] Fix discovery test on Windows

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 27 10:03:26 PDT 2017


rnk added a comment.

In https://reviews.llvm.org/D27701#626275, @modocache wrote:

> That makes sense, thanks for the feedback @delcypher.
>
> Is there a strong reason you'd prefer `/` in all cases, though?
>
> I ask because it seems more correct to output paths using each platform's native path separators. Yes, we could modify the logic in `LitConfig.py` to use `"/".join()` instead of `os.path.join()`, and replace `\` with `/` in the paths we output, but that seems like additional complexity for what is, in my opinion, marginal benefit. True, this particular test is uglier because of the difference in path separators, but this and https://reviews.llvm.org/D27908 are the only two tests that need to be modified for this reason. So personally, I think it makes more sense to change the tests, than it does to change lit's behavior.
>
> Thoughts?


I'd be in favor of always using forward slashes in lit output, personally. I just went ahead and committed that to try to get the tests green again. There are fewer and fewer utilities that don't understand forward slashes.


https://reviews.llvm.org/D27701





More information about the llvm-commits mailing list