[PATCH] D41776: [lit] Implement "-r" option for builtin "diff" command + a test using that.

Matt Morehouse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 5 10:57:46 PST 2018


morehouse added inline comments.


================
Comment at: utils/lit/lit/TestRunner.py:378
+        lines = []
+        for dir, subdirList, fileList in os.walk(path):
+            for file in fileList:
----------------
Does os.walk have well-defined ordering?  What if contents of `dir1` are visited in a different order than `dir2`?


================
Comment at: utils/lit/lit/TestRunner.py:386
+        return lines
+
     stderr = StringIO()
----------------
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?



https://reviews.llvm.org/D41776





More information about the llvm-commits mailing list