[PATCH] D58546: [lit] Honor PYTHONPATH for llvm tests

David Greene via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 22 07:22:38 PST 2019


greened created this revision.
greened added reviewers: thakis, courbet, phosek, rnk, anemet.
Herald added a reviewer: serge-sans-paille.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


Repository:
  rL LLVM

https://reviews.llvm.org/D58546

Files:
  llvm/test/lit.cfg.py


Index: llvm/test/lit.cfg.py
===================================================================
--- llvm/test/lit.cfg.py
+++ llvm/test/lit.cfg.py
@@ -58,6 +58,9 @@
 # Set up OCAMLRUNPARAM to enable backtraces in OCaml tests.
 llvm_config.with_environment('OCAMLRUNPARAM', 'b')
 
+# Honor PYTHONPATH if set.
+llvm_config.with_system_environment('PYTHONPATH')
+
 # Provide the path to asan runtime lib 'libclang_rt.asan_osx_dynamic.dylib' if
 # available. This is darwin specific since it's currently only needed on darwin.
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58546.187935.patch
Type: text/x-patch
Size: 524 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190222/48b5cb73/attachment.bin>


More information about the llvm-commits mailing list