This greatly reduces the amount of boilerplate in our tests.
Details
- Reviewers
smeenai compnerd - Group Reviewers
Restricted Project - Commits
- rG643ec67a64ad: [lld-macho] Always include custom syslibroot when running tests
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
The test cleanups are really nice, but I'm not a fan of coding this sort of test-specific behavior (especially the path) into LLD itself :/ (I know we have some precedent with LLD_IN_TEST, but that's only used in canExitEarly and it's a pretty minor behavior change.)
Given the previous objection to substitutions though, this might be the best solution. I think I'd feel better about it if the environment variable just contained the syslibroot path directly, because then the path (which is test-specific knowledge) is fully contained in the test configs.
Also adding @MaskRay in case he has any thoughts on substitutions vs. environment variables.
(Requesting changes to put back in your queue.)
One downside of lit substitutions is that running llvm-lit <test> will then generate a temporary file in the current directory.
But I don't really care one way or another -- I did it this way primarily because of @ruiu's preference.
lld changes seem unrelated (include changes, whitespace); LGTM with the copyright header for lit.cfg
lld/test/MachO/lit.local.cfg | ||
---|---|---|
3 | Please add the copyright header |
lld/test/MachO/lit.local.cfg | ||
---|---|---|
3 | hmm I looked at a bunch of other lit.cfg.py files and they all seemed to lack the copyright header |
Please add the copyright header