[PATCH] D41776: [lit] Implement "-r" option for builtin "diff" command + a test using that.
Max Moroz via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 5 11:21:48 PST 2018
Dor1s marked an inline comment as done.
Dor1s added a comment.
Thanks for the comments, I'll work more on it in order to follow "diff" utility default output.
================
Comment at: utils/lit/lit/TestRunner.py:378
+ lines = []
+ for dir, subdirList, fileList in os.walk(path):
+ for file in fileList:
----------------
morehouse wrote:
> Does os.walk have well-defined ordering? What if contents of `dir1` are visited in a different order than `dir2`?
I believe so, but either way it looks like this needs more work in order to provide the same output as a regular "diff" utility does.
================
Comment at: utils/lit/lit/TestRunner.py:386
+ return lines
+
stderr = StringIO()
----------------
morehouse wrote:
> Do we also want to compare file names?
>
> E.g., what if we have
> ```
> dir1/a # Contents: 12345
> dir2/b # Contents: 12345
> ```
>
> Won't this implementation consider dir1 and dir2 to be the same?
>
Right, thanks!
https://reviews.llvm.org/D41776
More information about the llvm-commits
mailing list