summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <fedora@famillecollet.com>2012-09-04 07:39:05 +0200
committerRemi Collet <fedora@famillecollet.com>2012-09-04 07:39:05 +0200
commit61522fbb0764c305d52bb3e8cb2a8caeae434133 (patch)
treefb71b322c417585488730890880dfa4c0904f8e2
parent9d7091e7b936957410c349d2f9ea1e6345f647b8 (diff)
php-pecl-apc: more patch, run full test suite
-rw-r--r--apc-svn.patch29
-rw-r--r--php-pecl-apc.spec24
2 files changed, 39 insertions, 14 deletions
diff --git a/apc-svn.patch b/apc-svn.patch
index b293ddc..b1955f3 100644
--- a/apc-svn.patch
+++ b/apc-svn.patch
@@ -177,3 +177,32 @@
["value"]=>
string(%d) "%s"
["num_hits"]=>
+--- pecl/apc/trunk/tests/apc54_020.phpt 2012/09/04 00:04:46 327452
++++ pecl/apc/trunk/tests/apc54_020.phpt 2012/09/04 05:30:31 327453
+@@ -3,8 +3,8 @@
+ --SKIPIF--
+ <?php
+ require_once(dirname(__FILE__) . '/skipif.inc');
+- if (PHP_MAJOR_VERSION < 5 || (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION < 4)) {
+- die('skip PHP 5.4+ only');
++ if (version_compare(PHP_VERSION, '5.4.6', '<')) {
++ die('skip PHP 5.4.6+ only');
+ }
+ --FILE--
+ <?php
+--- pecl/apc/trunk/tests/server_test.inc 2012/09/04 05:30:31 327453
++++ pecl/apc/trunk/tests/server_test.inc 2012/09/04 05:32:28 327454
+@@ -23,8 +23,11 @@
+ 2 => STDERR,
+ );
+
+- $ext = (substr(PHP_OS, 0, 3) == 'WIN') ? 'php_apc.dll' : 'apc.so';
+- $php_args = "-d extension_dir=$doc_root/../modules -d extension=$ext";
++ $php_args = getenv('TEST_PHP_ARGS');
++ if (empty($php_args)) {
++ $ext = (substr(PHP_OS, 0, 3) == 'WIN') ? 'php_apc.dll' : 'apc.so';
++ $php_args = "-d extension_dir=$doc_root/../modules -d extension=$ext";
++ }
+ if ($php_opts) {
+ $php_args = "$php_args -d " . implode(' -d ', $php_opts);;
+ }
diff --git a/php-pecl-apc.spec b/php-pecl-apc.spec
index b28d5e2..9128b42 100644
--- a/php-pecl-apc.spec
+++ b/php-pecl-apc.spec
@@ -11,9 +11,11 @@ Group: Development/Languages
URL: http://pecl.php.net/package/APC
Source: http://pecl.php.net/get/APC-%{version}.tgz
-# Upstream patch from SVN.
+# Upstream patch from SVN, fixed test suite.
# http://svn.php.net/viewvc?view=revision&revision=327449
# http://svn.php.net/viewvc?view=revision&revision=327450
+# http://svn.php.net/viewvc?view=revision&revision=327453
+# http://svn.php.net/viewvc?view=revision&revision=327454
Patch0: apc-svn.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
@@ -64,10 +66,6 @@ These are the files needed to compile programs using APC serializer.
cd APC-%{version}
%patch0 -p3 -b .orig
-# There are currently some failed tests, https://bugs.php.net/63003
-# which requires dom extension, so drop them for now.
-rm -f tests/apc54_00{3,8,9}.phpt
-
%if 0%{?__isa_bits}
# port number to allow 32/64 build at same time
port=$(expr %{__isa_bits} + 8900)
@@ -206,22 +204,20 @@ cd %{pecl_name}-%{version}
ln -sf %{php_extdir}/dom.so modules/
TEST_PHP_EXECUTABLE=%{_bindir}/php \
+TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=dom.so -d extension=apc.so" \
+NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
-%{_bindir}/php run-tests.php \
- -n -q -d extension_dir=modules \
- -d extension=dom.so \
- -d extension=apc.so
+%{_bindir}/php run-tests.php
%if 0%{?__ztsphp:1}
cd ../%{pecl_name}-%{version}-zts
ln -sf %{php_ztsextdir}/dom.so modules/
TEST_PHP_EXECUTABLE=%{__ztsphp} \
+TEST_PHP_ARGS="-n -d extension_dir=$PWD/modules -d extension=dom.so -d extension=apc.so" \
+NO_INTERACTION=1 \
REPORT_EXIT_STATUS=1 \
-%{__ztsphp} run-tests.php \
- -n -q -d extension_dir=modules \
- -d extension=dom.so \
- -d extension=apc.so
+%{__ztsphp} run-tests.php
%endif
@@ -266,7 +262,7 @@ rm -rf %{buildroot}
* Mon Sep 3 2012 Remi Collet <remi@fedoraproject.org> - 3.1.13-1
- Version 3.1.13 (beta) - API 3.1.0 (stable)
- add patches from upstream (fixes some tests)
-- change serveur port for tests (32/64 bits)
+- change serveur port for tests (allow 32/64 bits build)
- obsoletes php53*, php54*
* Sun Aug 26 2012 Remi Collet <remi@fedoraproject.org> - 3.1.12-2