dev-libs/poco: fix tests
authorHans de Graaff <graaff@gentoo.org>
Tue, 16 Jul 2019 10:20:38 +0000 (12:20 +0200)
committerHans de Graaff <graaff@gentoo.org>
Tue, 16 Jul 2019 10:20:59 +0000 (12:20 +0200)
- Redis tests require a running redis server
- Crypto tests require the POCO_BASE env variable to be set

Fixes: https://bugs.gentoo.org/682272
Signed-off-by: Hans de Graaff <graaff@gentoo.org>
Package-Manager: Portage-2.3.66, Repoman-2.3.11

dev-libs/poco/poco-1.9.0-r2.ebuild

index dabc308f3bb4890430bd4539a700682d34161953..151789c1733dbe60a5be1d768c8568d26b508c6f 100644 (file)
@@ -54,7 +54,7 @@ src_prepare() {
                # and tests requiring running DB-servers, internet connections, etc.
                sed -i \
                        -e '/testsuite/d' \
-                       {Data/{MySQL,ODBC},MongoDB,Net,NetSSL_OpenSSL,PDF}/CMakeLists.txt || die
+                       {Data/{MySQL,ODBC},MongoDB,Net,NetSSL_OpenSSL,PDF,Redis}/CMakeLists.txt || die
                # Poco expands ~ using passwd, which does not match $HOME in the build environment
                sed -i \
                        -e '/CppUnit_addTest.*testExpand/d' \
@@ -67,17 +67,20 @@ src_prepare() {
        fi
 
        if use mariadb ; then
-               # Fix MariaDB detection
+               # Fix MariaDB detection
                sed -i -e 's~/usr/include/mysql~~' \
                        -e 's/STATUS "Couldn/FATAL_ERROR "Couldn/' \
                cmake/FindMySQL.cmake || die
        else
-               # Fix MySQL detection
+               # Fix MySQL detection
                sed -i -e 's/mysqlclient_r/mysqlclient/' \
                        -e 's/STATUS "Couldn/FATAL_ERROR "Couldn/' \
                cmake/FindMySQL.cmake || die
        fi
 
+       # Add missing directory that breaks the build
+       mkdir -p Encodings/testsuite/data || die
+
        cmake-utils_src_prepare
 }
 
@@ -115,6 +118,10 @@ src_configure() {
        cmake-utils_src_configure
 }
 
+src_test() {
+       POCO_BASE="${S}" cmake-utils_src_test
+}
+
 src_install() {
        cmake-utils_src_install