sys-libs/llvm-libunwind: Fix running multilib tests
authorMichał Górny <mgorny@gentoo.org>
Fri, 16 Mar 2018 09:08:44 +0000 (10:08 +0100)
committerMichał Górny <mgorny@gentoo.org>
Fri, 16 Mar 2018 09:32:35 +0000 (10:32 +0100)
Fix tests to use multilib-wrapped compiler. Otherwise, the tests were
actually done using native ABI library which missed the point. Also,
add missing MULTILIB_USEDEP.

sys-libs/llvm-libunwind/llvm-libunwind-6.0.0.ebuild
sys-libs/llvm-libunwind/llvm-libunwind-6.0.9999.ebuild
sys-libs/llvm-libunwind/llvm-libunwind-9999.ebuild

index fcc113a63c9c2b4ea089eaca89677f822fbd7de0..fe3c0e9d64209c939738e478561fc21373f0c449 100644 (file)
@@ -29,9 +29,9 @@ RDEPEND="!sys-libs/libunwind"
 # (but libcxx does not need to be built against it)
 DEPEND="
        >=sys-devel/llvm-6
-       test? (
+       test? ( >=sys-devel/clang-3.9.0
                sys-libs/libcxx[libunwind,${MULTILIB_USEDEP}]
-               sys-libs/libcxxabi
+               sys-libs/libcxxabi[${MULTILIB_USEDEP}]
                $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
 
 S=${WORKDIR}/${MY_P}
@@ -84,6 +84,11 @@ multilib_src_configure() {
 }
 
 multilib_src_test() {
+       local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
+
+       [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
+       sed -i -e "/cxx_under_test/s^\".*\"^\"${clang_path}\"^" test/lit.site.cfg || die
+
        cmake-utils_src_make check-unwind
 }
 
index 6eb95d733fc2b997285325e14d023d66bc56e826..83db4453f60bafa03fa62123e51221cade911e33 100644 (file)
@@ -28,9 +28,9 @@ RDEPEND="!sys-libs/libunwind"
 # (but libcxx does not need to be built against it)
 DEPEND="
        >=sys-devel/llvm-6
-       test? (
+       test? ( >=sys-devel/clang-3.9.0
                sys-libs/libcxx[libunwind,${MULTILIB_USEDEP}]
-               sys-libs/libcxxabi
+               sys-libs/libcxxabi[${MULTILIB_USEDEP}]
                $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
 
 # least intrusive of all
@@ -84,6 +84,11 @@ multilib_src_configure() {
 }
 
 multilib_src_test() {
+       local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
+
+       [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
+       sed -i -e "/cxx_under_test/s^\".*\"^\"${clang_path}\"^" test/lit.site.cfg || die
+
        cmake-utils_src_make check-unwind
 }
 
index 387b8c31086c2f2bcb798850caeea5aba2309df5..238afe790e632280344711c037b1bed89042167e 100644 (file)
@@ -27,9 +27,9 @@ RDEPEND="!sys-libs/libunwind"
 # (but libcxx does not need to be built against it)
 DEPEND="
        >=sys-devel/llvm-6
-       test? (
+       test? ( >=sys-devel/clang-3.9.0
                sys-libs/libcxx[libunwind,${MULTILIB_USEDEP}]
-               sys-libs/libcxxabi
+               sys-libs/libcxxabi[${MULTILIB_USEDEP}]
                $(python_gen_any_dep 'dev-python/lit[${PYTHON_USEDEP}]') )"
 
 # least intrusive of all
@@ -83,6 +83,11 @@ multilib_src_configure() {
 }
 
 multilib_src_test() {
+       local clang_path=$(type -P "${CHOST:+${CHOST}-}clang" 2>/dev/null)
+
+       [[ -n ${clang_path} ]] || die "Unable to find ${CHOST}-clang for tests"
+       sed -i -e "/cxx_under_test/s^\".*\"^\"${clang_path}\"^" test/lit.site.cfg || die
+
        cmake-utils_src_make check-unwind
 }