[python] [tests] Support overriding library path via environment
authorMichal Gorny <mgorny@gentoo.org>
Thu, 11 Oct 2018 11:58:07 +0000 (11:58 +0000)
committerMichal Gorny <mgorny@gentoo.org>
Thu, 11 Oct 2018 11:58:07 +0000 (11:58 +0000)
commitc37d16140a8e2ba36929a5b11b53d5477460b96c
tree31322b9c237cfe78eaec4d5ff74e7ae7e5c90d46
parent8066198442da16027a646c56d3c87ca0ba3fcb86
[python] [tests] Support overriding library path via environment

Support a new CLANG_LIBRARY_PATH environment variable for the Python
binding tests.  This variable can be used to force the bindings to load
libclang.* from a specific directory.

I plan to use this when integrating Python binding tests with the CMake
build system.  Currently, those tests load libclang.so from default
search paths, so I would have to rely on platform-specific mechanics
such as LD_LIBRARY_PATH.  Instead of copying the whole logic necessary
to handle platform differences into yet another place, it's easier to
just add a dedicated variable for this purpose.

Differential Revision: https://reviews.llvm.org/D52806

llvm-svn: 344240
18 files changed:
clang/bindings/python/README.txt
clang/bindings/python/tests/cindex/test_access_specifiers.py
clang/bindings/python/tests/cindex/test_cdb.py
clang/bindings/python/tests/cindex/test_code_completion.py
clang/bindings/python/tests/cindex/test_comment.py
clang/bindings/python/tests/cindex/test_cursor.py
clang/bindings/python/tests/cindex/test_cursor_kind.py
clang/bindings/python/tests/cindex/test_diagnostics.py
clang/bindings/python/tests/cindex/test_exception_specification_kind.py
clang/bindings/python/tests/cindex/test_file.py
clang/bindings/python/tests/cindex/test_index.py
clang/bindings/python/tests/cindex/test_linkage.py
clang/bindings/python/tests/cindex/test_location.py
clang/bindings/python/tests/cindex/test_tls_kind.py
clang/bindings/python/tests/cindex/test_token_kind.py
clang/bindings/python/tests/cindex/test_tokens.py
clang/bindings/python/tests/cindex/test_translation_unit.py
clang/bindings/python/tests/cindex/test_type.py