This is an archive of the discontinued LLVM Phabricator instance.

[lit] Honor PYTHONPATH for llvm tests
Needs ReviewPublic

Authored by greened on Feb 22 2019, 7:20 AM.

Details

Summary

If the user has a custom PYTHONPATH set, include it in the testing environment. This fixes an issue where certain python packages (pygments, for example) are found during build configuration but then aren't found during testing, leading to test failures.

Diff Detail

Repository
rL LLVM

Event Timeline

greened created this revision.Feb 22 2019, 7:20 AM
Herald added a project: Restricted Project. · View Herald Transcript

If we do this, should we do it in lit? Else we probably need to do it in llvm, clang, lld, clang-tools-extra, etc etc etc.

greened added a comment.EditedFeb 28 2019, 8:15 AM

If we do this, should we do it in lit? Else we probably need to do it in llvm, clang, lld, clang-tools-extra, etc etc etc.

Maybe? I did just enough to get tests working for us. It would be helpful to get this merged before tackling the larger lit question.

I'd rather have it here than in lit. As a test environment, I love it when there's as few environment values that depends on the launch site as possible. It makes reproducibility easier.