The new scheme should match the normalization of embedded paths in
linkrepro tar files.
Details
Diff Detail
- Build Status
Buildable 11267 Build 11267: arc lint + arc unit
Event Timeline
llvm/utils/lit/lit/TestRunner.py | ||
---|---|---|
870–879 | I think the %: substitutions are used outside of linkrepro tar files, so it seems odd to change the semantics of ALL substitutions just for the purposes of a small number of tests. We already have %: (remove :), and %/ (convert \ to /). Maybe adding %:/ (remove : *and* convert \ to /) is a better choice? This way if for some reason someone still needs to use the existing semantics of %:, they can get it. |
llvm/utils/lit/lit/TestRunner.py | ||
---|---|---|
830 | This returns /foo for C:\foo, no? |
I introduced %:X lit variables for linkrepro tests, and I doubt we use them in other tests.
In that case, I would suggest a couple of different alternatives:
- If it's really not usable outside of LLD, add the substitutions to LLD's lit.cfg.py instead of to LLVM's TestRunner.py. A person writing a test for clang doesn't care about linkrepro TAR files and shouldn't have to understand how this comment applies to them. Worse, lit is downloadable as a public package from various package managesr, and these people using lit are not even doing anything related to LLVM (or even compilers) at all. It doesn't make sense for them to read a comment about linkrepro tar files. If it's in the core lit infrastructure, it has to be independent of how we (LLVM/LLD/Clang) decide to use it.
- Re-write the comment to explain what it does, but don't mention linkrepro or tar files. For the same reason as above. (Basically: Just delete the second sentence).
I did a grep of the code, and you're right that these substitutions are not used outside of lld. For that reason, number 1 seems more "correct", but number 2 is less work to change.
This returns /foo for C:\foo, no?