summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMatti Bickel <mabi@gentoo.org>2010-09-13 13:44:14 +0000
committerMatti Bickel <mabi@gentoo.org>2010-09-13 13:44:14 +0000
commitdcda7ef0b3882556d1f233db55df78ba4a907093 (patch)
tree0a0ca9ddc8487a85d8752716a5f27ce295083c71 /eclass
parentremanifest (diff)
downloadhistorical-dcda7ef0b3882556d1f233db55df78ba4a907093.tar.gz
historical-dcda7ef0b3882556d1f233db55df78ba4a907093.tar.bz2
historical-dcda7ef0b3882556d1f233db55df78ba4a907093.zip
add default src_test for pecl packages
Diffstat (limited to 'eclass')
-rw-r--r--eclass/php-ext-pecl-r1.eclass17
1 files changed, 15 insertions, 2 deletions
diff --git a/eclass/php-ext-pecl-r1.eclass b/eclass/php-ext-pecl-r1.eclass
index 9ea5a9d94cf1..7981b0a2e5fd 100644
--- a/eclass/php-ext-pecl-r1.eclass
+++ b/eclass/php-ext-pecl-r1.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-pecl-r1.eclass,v 1.11 2008/01/06 19:30:24 swegener Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/php-ext-pecl-r1.eclass,v 1.12 2010/09/13 13:44:14 mabi Exp $
#
# Author: Tal Peer <coredumb@gentoo.org>
# Author: Luca Longinotti <chtekk@gentoo.org>
@@ -45,7 +45,7 @@ PECL_PKG_V="${PECL_PKG}-${MY_PV}"
inherit php-ext-source-r1 depend.php
-EXPORT_FUNCTIONS src_compile src_install
+EXPORT_FUNCTIONS src_compile src_install src_test
if [[ -n "${PHP_EXT_PECL_FILENAME}" ]] ; then
FILENAME="${PHP_EXT_PECL_FILENAME}-${MY_PV}.tgz"
@@ -88,3 +88,16 @@ php-ext-pecl-r1_src_install() {
doins -r examples/*
fi
}
+
+# @FUNCTION: php-ext-pecl-r1_src_test
+# @DESCRIPTION:
+# Takes care of running any tests delivered with the PECL package.
+# Testing is somewhat standardized across pecl extensions through phpize's
+# run-tests.php - unfortunatly there are some quirks we need to work around
+php-ext-pecl-r1_src_test() {
+ # Makefile passes a hard-coded -d extension_dir=./modules, we move the lib
+ # away from there in src_compile
+ ln -s "${WORKDIR}/${PHP_EXT_NAME}-default.so" "${S}/modules/${PHP_EXT_NAME}.so"
+
+ NO_INTERACTION="yes" emake test
+}