summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2018-05-18 16:09:27 -0400
committerBrian Evans <grknight@gentoo.org>2018-05-18 16:11:00 -0400
commitd676eb38df8ab595af6c03def8b095672d297e79 (patch)
treebf2f0236de5ea6efbca032ab218c221178fce635
parentmedia-fonts/alee-fonts: Sync HOMEPAGE (diff)
downloadgentoo-d676eb38df8ab595af6c03def8b095672d297e79.tar.gz
gentoo-d676eb38df8ab595af6c03def8b095672d297e79.tar.bz2
gentoo-d676eb38df8ab595af6c03def8b095672d297e79.zip
dev-php/pecl-http: Fix tests so they don't SKIP everything
The basic testing command ignores the requirements of other extensions needed to run. This adds the required ones. Package-Manager: Portage-2.3.38, Repoman-2.3.9
-rw-r--r--dev-php/pecl-http/pecl-http-2.6.0-r2.ebuild13
-rw-r--r--dev-php/pecl-http/pecl-http-3.1.0-r2.ebuild17
2 files changed, 30 insertions, 0 deletions
diff --git a/dev-php/pecl-http/pecl-http-2.6.0-r2.ebuild b/dev-php/pecl-http/pecl-http-2.6.0-r2.ebuild
index 3a3e49cd8b34..63cfe3ff8054 100644
--- a/dev-php/pecl-http/pecl-http-2.6.0-r2.ebuild
+++ b/dev-php/pecl-http/pecl-http-2.6.0-r2.ebuild
@@ -53,6 +53,19 @@ src_install() {
fi
}
+src_test() {
+ for slot in $(php_get_slots); do
+ php_init_slot_env "${slot}"
+ ln -s "${EXT_DIR}/propro.so" "modules/propro.so" || die
+ ln -s "${EXT_DIR}/raphf.so" "modules/raphf.so" || die
+ sed -i \
+ 's/PHP_TEST_SHARED_EXTENSIONS)/PHP_TEST_SHARED_EXTENSIONS) -d extension=propro.so -d extension=raphf.so/' \
+ Makefile || die
+ NO_INTERACTION="yes" emake test
+ rm modules/propro.so modules/raphf.so || die
+ done
+}
+
pkg_postinst() {
ewarn "This API has drastically changed and is not compatible with the 1.x syntax."
ewarn "Please review the documentation and update your code."
diff --git a/dev-php/pecl-http/pecl-http-3.1.0-r2.ebuild b/dev-php/pecl-http/pecl-http-3.1.0-r2.ebuild
index 68af2db5ec80..9351232041c4 100644
--- a/dev-php/pecl-http/pecl-http-3.1.0-r2.ebuild
+++ b/dev-php/pecl-http/pecl-http-3.1.0-r2.ebuild
@@ -53,6 +53,23 @@ src_install() {
fi
}
+src_test() {
+ # Cannot use eclass function due to required modules
+ # All tests SKIP otherwise
+ for slot in $(php_get_slots); do
+ php_init_slot_env "${slot}"
+ # Link in required modules for testing
+ ln -s "${EXT_DIR}/propro.so" "modules/propro.so" || die
+ ln -s "${EXT_DIR}/raphf.so" "modules/raphf.so" || die
+ sed -i \
+ 's/PHP_TEST_SHARED_EXTENSIONS)/PHP_TEST_SHARED_EXTENSIONS) -d extension=propro.so -d extension=raphf.so/' \
+ Makefile || die
+ NO_INTERACTION="yes" emake test
+ # Clean up testing links
+ rm modules/propro.so modules/raphf.so || die
+ done
+}
+
pkg_postinst() {
ewarn "This API has drastically changed and is not compatible with the 1.x syntax."
ewarn "Please review the documentation and update your code."