1 |
commit: 902f8fef9c80174eece928c918dfd2b8855c5e19 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Oct 11 22:24:36 2016 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Oct 11 22:25:03 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=902f8fef |
7 |
|
8 |
php-ext-source-r3.eclass: Add src_test function |
9 |
|
10 |
php-ext-source-r3 eclass currently does not provide FEATURES=test support |
11 |
like php-ext-pecl-r3 eclass does. This commit will add and export the |
12 |
src_test function from php-ext-pecl-r3 eclass to php-ext-source-r3 eclass |
13 |
to allow testing of PHP standalone extensions as well. |
14 |
|
15 |
eclass/php-ext-source-r3.eclass | 14 +++++++++++++- |
16 |
1 file changed, 13 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/eclass/php-ext-source-r3.eclass b/eclass/php-ext-source-r3.eclass |
19 |
index 3372a4b..f2999d4 100644 |
20 |
--- a/eclass/php-ext-source-r3.eclass |
21 |
+++ b/eclass/php-ext-source-r3.eclass |
22 |
@@ -12,7 +12,7 @@ |
23 |
|
24 |
inherit autotools |
25 |
|
26 |
-EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install |
27 |
+EXPORT_FUNCTIONS src_unpack src_prepare src_configure src_compile src_install src_test |
28 |
|
29 |
case ${EAPI} in |
30 |
6) ;; |
31 |
@@ -230,6 +230,18 @@ php-ext-source-r3_src_install() { |
32 |
php-ext-source-r3_createinifiles |
33 |
} |
34 |
|
35 |
+# @FUNCTION: php-ext-source-r3_src_test |
36 |
+# @DESCRIPTION: |
37 |
+# Run tests delivered with the standalone PHP extension. Phpize will have generated |
38 |
+# a run-tests.php file to be executed by `make test`. We only need to |
39 |
+# force the test suite to run in non-interactive mode. |
40 |
+php-ext-source-r3_src_test() { |
41 |
+ for slot in $(php_get_slots); do |
42 |
+ php_init_slot_env "${slot}" |
43 |
+ NO_INTERACTION="yes" emake test |
44 |
+ done |
45 |
+} |
46 |
+ |
47 |
# @FUNCTION: php_get_slots |
48 |
# @DESCRIPTION: |
49 |
# Get a list of PHP slots contained in both the ebuild's USE_PHP and the |