media-libs/x265: Make src_test more robust.
authorAlexis Ballier <aballier@gentoo.org>
Thu, 15 Oct 2015 14:28:18 +0000 (16:28 +0200)
committerAlexis Ballier <aballier@gentoo.org>
Thu, 15 Oct 2015 14:28:32 +0000 (16:28 +0200)
Build system builds "tests" only when asm optimizations are enabled, which may be disabled by other means (x32 or pic). Run tests only when it decided to build them.

Package-Manager: portage-2.2.23

media-libs/x265/x265-1.8.ebuild
media-libs/x265/x265-9999.ebuild

index d5b67b240d170cfa582d541deed7614eca4deb0e..1505f631304938f2d7e07cd17348c57ae8cacee3 100644 (file)
@@ -76,11 +76,11 @@ src_configure() {
 }
 
 multilib_src_test() {
-       if has ${MULTILIB_ABI_FLAG} abi_x86_32 abi_x86_64 ; then
-               cd "${BUILD_DIR}/test" || die
-               for i in TestBench ; do
-                       ./${i} || die
-               done
+       if [ -x "${BUILD_DIR}/test/TestBench" ] ; then
+               "${BUILD_DIR}/test/TestBench" || die
+       else
+               einfo "Unit tests check only assembly, and you do not seem to have any."
+               einfo "Skipping tests."
        fi
 }
 
index 1298033d279a9ef641fae876c08a4fc3eb0056dd..0d77b713795672745cc54811f43975f7bb31997a 100644 (file)
@@ -72,11 +72,11 @@ src_configure() {
 }
 
 multilib_src_test() {
-       if has ${MULTILIB_ABI_FLAG} abi_x86_32 abi_x86_64 ; then
-               cd "${BUILD_DIR}/test" || die
-               for i in TestBench ; do
-                       ./${i} || die
-               done
+       if [ -x "${BUILD_DIR}/test/TestBench" ] ; then
+               "${BUILD_DIR}/test/TestBench" || die
+       else
+               einfo "Unit tests check only assembly, and you do not seem to have any."
+               einfo "Skipping tests."
        fi
 }