dev-python/clang-python: Run tests against matching clang library

Signed-off-by: Michał Górny <mgorny@gentoo.org>
This commit is contained in:
Michał Górny
2022-09-21 08:38:15 +02:00
parent 807f81ccda
commit 3e36c5ac0f
4 changed files with 24 additions and 0 deletions

View File

@@ -29,12 +29,18 @@ RDEPEND="
"
BDEPEND="
${PYTHON_DEPS}
test? (
sys-devel/clang:${PV%%.*}
)
"
LLVM_COMPONENTS=( clang/bindings/python )
llvm.org_set_globals
python_test() {
# tests rely on results from a specific clang version, so override
# the search path
local -x CLANG_LIBRARY_PATH=${BROOT}/usr/lib/llvm/${PV%%.*}/$(get_libdir)
"${EPYTHON}" -m unittest discover -v || die "Tests fail with ${EPYTHON}"
}

View File

@@ -29,12 +29,18 @@ RDEPEND="
"
BDEPEND="
${PYTHON_DEPS}
test? (
sys-devel/clang:${PV%%.*}
)
"
LLVM_COMPONENTS=( clang/bindings/python )
llvm.org_set_globals
python_test() {
# tests rely on results from a specific clang version, so override
# the search path
local -x CLANG_LIBRARY_PATH=${BROOT}/usr/lib/llvm/${PV%%.*}/$(get_libdir)
"${EPYTHON}" -m unittest discover -v || die "Tests fail with ${EPYTHON}"
}

View File

@@ -29,12 +29,18 @@ RDEPEND="
"
BDEPEND="
${PYTHON_DEPS}
test? (
sys-devel/clang:${PV%%.*}
)
"
LLVM_COMPONENTS=( clang/bindings/python )
llvm.org_set_globals
python_test() {
# tests rely on results from a specific clang version, so override
# the search path
local -x CLANG_LIBRARY_PATH=${BROOT}/usr/lib/llvm/${PV%%.*}/$(get_libdir)
"${EPYTHON}" -m unittest discover -v || die "Tests fail with ${EPYTHON}"
}

View File

@@ -29,12 +29,18 @@ RDEPEND="
"
BDEPEND="
${PYTHON_DEPS}
test? (
sys-devel/clang:${PV%%.*}
)
"
LLVM_COMPONENTS=( clang/bindings/python )
llvm.org_set_globals
python_test() {
# tests rely on results from a specific clang version, so override
# the search path
local -x CLANG_LIBRARY_PATH=${BROOT}/usr/lib/llvm/${PV%%.*}/$(get_libdir)
"${EPYTHON}" -m unittest discover -v || die "Tests fail with ${EPYTHON}"
}