summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Deutschmann <whissi@gentoo.org>2016-10-12 00:24:36 +0200
committerThomas Deutschmann <whissi@gentoo.org>2016-10-12 00:25:03 +0200
commit902f8fef9c80174eece928c918dfd2b8855c5e19 (patch)
tree7723495c07351fb3c729b8e20df6f863d4e29a02 /eclass/php-ext-source-r3.eclass
parentsys-cluster/ceph: Version bump to 10.2.3 (diff)
downloadgentoo-902f8fef9c80174eece928c918dfd2b8855c5e19.tar.gz
gentoo-902f8fef9c80174eece928c918dfd2b8855c5e19.tar.bz2
gentoo-902f8fef9c80174eece928c918dfd2b8855c5e19.zip
php-ext-source-r3.eclass: Add src_test function
php-ext-source-r3 eclass currently does not provide FEATURES=test support like php-ext-pecl-r3 eclass does. This commit will add and export the src_test function from php-ext-pecl-r3 eclass to php-ext-source-r3 eclass to allow testing of PHP standalone extensions as well.
Diffstat (limited to 'eclass/php-ext-source-r3.eclass')
-rw-r--r--eclass/php-ext-source-r3.eclass14
1 files changed, 13 insertions, 1 deletions
diff --git a/eclass/php-ext-source-r3.eclass b/eclass/php-ext-source-r3.eclass
index 3372a4b83470..f2999d43c44f 100644
--- a/eclass/php-ext-source-r3.eclass
+++ b/eclass/php-ext-source-r3.eclass
@@ -12,7 +12,7 @@
inherit autotools
-EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install
+EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install src_test
case ${EAPI} in
6) ;;
@@ -230,6 +230,18 @@ php-ext-source-r3_src_install() {
php-ext-source-r3_createinifiles
}
+# @FUNCTION: php-ext-source-r3_src_test
+# @DESCRIPTION:
+# Run tests delivered with the standalone PHP extension. Phpize will have generated
+# a run-tests.php file to be executed by `make test`. We only need to
+# force the test suite to run in non-interactive mode.
+php-ext-source-r3_src_test() {
+ for slot in $(php_get_slots); do
+ php_init_slot_env "${slot}"
+ NO_INTERACTION="yes" emake test
+ done
+}
+
# @FUNCTION: php_get_slots
# @DESCRIPTION:
# Get a list of PHP slots contained in both the ebuild's USE_PHP and the