forked from OSchip/llvm-project
[lit] Drop the user-site packages directory from search paths when running tests
Do not add user-site packages directory to the python search path. This avoids test failures if there's an incompatible lit module installed inside the user-site packages directory, as it gets prioritized over the lit from the PYTHONPATH.
This commit is contained in:
parent
06d3fce01d
commit
32837a60ac
|
@ -40,6 +40,10 @@ if llvm_config:
|
|||
llvm_config.with_environment('PYTHONPATH', lit_path, append_path=True)
|
||||
else:
|
||||
config.environment['PYTHONPATH'] = os.pathsep.join([lit_path])
|
||||
# Do not add user-site packages directory to the python search path. This avoids test failures if there's an
|
||||
# incompatible lit module installed inside the user-site packages directory, as it gets prioritized over the lit
|
||||
# from the PYTHONPATH.
|
||||
config.environment['PYTHONNOUSERSITE'] = '1'
|
||||
|
||||
# Add llvm and lit tools directories if this config is being loaded indirectly.
|
||||
# In this case, we can also expect llvm_config to have been imported correctly.
|
||||
|
|
Loading…
Reference in New Issue