From df7e0f9ddcba4fa508972960eb521cc7dd35215c Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Wed, 18 Oct 2017 05:28:35 +0200 Subject: fix test suite --- 6f90bb196268a5fc5e7b9c2fbb344972af7fdc5b.patch | 35 ++++++++++++++++++++++++++ db46ff6bc2b3401ac7f4c90b699b005ad678db44.patch | 22 ++++++++++++++++ php-pecl-xdebug.spec | 34 ++++++++++++++----------- 3 files changed, 76 insertions(+), 15 deletions(-) create mode 100644 6f90bb196268a5fc5e7b9c2fbb344972af7fdc5b.patch create mode 100644 db46ff6bc2b3401ac7f4c90b699b005ad678db44.patch diff --git a/6f90bb196268a5fc5e7b9c2fbb344972af7fdc5b.patch b/6f90bb196268a5fc5e7b9c2fbb344972af7fdc5b.patch new file mode 100644 index 0000000..8d579e7 --- /dev/null +++ b/6f90bb196268a5fc5e7b9c2fbb344972af7fdc5b.patch @@ -0,0 +1,35 @@ +From 6f90bb196268a5fc5e7b9c2fbb344972af7fdc5b Mon Sep 17 00:00:00 2001 +From: Derick Rethans +Date: Tue, 17 Oct 2017 21:12:43 +0100 +Subject: [PATCH] Mark the test for bug #886 as slow as it uses a lot of disk + space + +--- + tests/bug00886-php5.phpt | 1 + + tests/bug00886-php7.phpt | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/tests/bug00886-php5.phpt b/tests/bug00886-php5.phpt +index 708c4e78..f173ec83 100644 +--- a/tests/bug00886-php5.phpt ++++ b/tests/bug00886-php5.phpt +@@ -2,6 +2,7 @@ + Test for bug #886: Use the same file system protocol for file located inside PHAR in both directions (< PHP 7.0) + --SKIPIF-- + ++ + + --INI-- + xdebug.auto_trace=0 +diff --git a/tests/bug00886-php7.phpt b/tests/bug00886-php7.phpt +index 9e2c84ae..96b9ae6b 100644 +--- a/tests/bug00886-php7.phpt ++++ b/tests/bug00886-php7.phpt +@@ -2,6 +2,7 @@ + Test for bug #886: Use the same file system protocol for file located inside PHAR in both directions (>= PHP 7.0) + --SKIPIF-- + ++ + =')) echo "skip >= PHP 7.0 needed\n"; ?> + --INI-- + xdebug.auto_trace=0 diff --git a/db46ff6bc2b3401ac7f4c90b699b005ad678db44.patch b/db46ff6bc2b3401ac7f4c90b699b005ad678db44.patch new file mode 100644 index 0000000..b8e7a3b --- /dev/null +++ b/db46ff6bc2b3401ac7f4c90b699b005ad678db44.patch @@ -0,0 +1,22 @@ +From db46ff6bc2b3401ac7f4c90b699b005ad678db44 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Tue, 17 Oct 2017 18:08:56 +0200 +Subject: [PATCH] honours TEST_PHP_ARGS for sub-process + +--- + tests/dbgp/dbgpclient.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/dbgp/dbgpclient.php b/tests/dbgp/dbgpclient.php +index 3b7a2bce..337409fc 100644 +--- a/tests/dbgp/dbgpclient.php ++++ b/tests/dbgp/dbgpclient.php +@@ -70,7 +70,7 @@ private function launchPhp( &$pipes, array $ini_options = null ) + $ini_options = array(); + } + +- $options = ''; ++ $options = (getenv('TEST_PHP_ARGS') ?: ''); + $ini_options = array_merge( $default_options, $ini_options ); + foreach ( $ini_options as $key => $value ) + { diff --git a/php-pecl-xdebug.spec b/php-pecl-xdebug.spec index 44c2e4c..bec8f6f 100644 --- a/php-pecl-xdebug.spec +++ b/php-pecl-xdebug.spec @@ -35,7 +35,7 @@ Version: 2.5.5 %if 0%{?gh_date:1} Release: 0.5.%{gh_date}git%{gh_short}%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} %else -Release: 2%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +Release: 3%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} %endif # The Xdebug License, version 1.01 @@ -45,6 +45,9 @@ Group: Development/Languages URL: http://xdebug.org/ Source0: https://github.com/%{pecl_name}/%{pecl_name}/archive/%{gh_commit}/%{pecl_name}-%{version}%{?prever}-%{gh_short}.tar.gz +Patch1: https://github.com/xdebug/xdebug/commit/db46ff6bc2b3401ac7f4c90b699b005ad678db44.patch +Patch2: https://github.com/xdebug/xdebug/commit/6f90bb196268a5fc5e7b9c2fbb344972af7fdc5b.patch + BuildRequires: %{?scl_prefix}php-pear > 1.9.1 BuildRequires: %{?scl_prefix}php-devel > 5.5 BuildRequires: libedit-devel @@ -133,6 +136,8 @@ mv NTS/package.xml . %{?_licensedir:sed -e '/LICENSE/s/role="doc"/role="src"/' -i package.xml} cd NTS +%patch1 -p1 -b .upstream1 +%patch2 -p1 -b .upstream2 # Check extension version ver=$(sed -n '/XDEBUG_VERSION/{s/.* "//;s/".*$//;p}' php_xdebug.h) @@ -216,6 +221,14 @@ done %check +# Shared needed extensions +modules="" +for mod in simplexml; do + if [ -f %{php_extdir}/${mod}.so ]; then + modules="$modules -d extension=${mod}.so" + fi +done + # only check if build extension can be loaded %{_bindir}/php \ --no-php-ini \ @@ -231,22 +244,10 @@ done %if %{with_tests} cd NTS -# ignore kwown failed tests -#rm tests/bug00623.phpt -#rm tests/bug00687.phpt -#rm tests/bug00778.phpt -#rm tests/bug00806.phpt -#rm tests/bug00840.phpt -#rm tests/bug00886.phpt -#rm tests/bug00913.phpt -#rm tests/bug01059.phpt -#rm tests/bug01104.phpt -#rm tests/dbgp-context-get.phpt -#rm tests/dbgp-property-get-constants.phpt - : Upstream test suite NTS extension +SKIP_SLOW_TESTS=1 \ TEST_PHP_EXECUTABLE=%{_bindir}/php \ -TEST_PHP_ARGS="-n -d extension=soap.so -d zend_extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \ +TEST_PHP_ARGS="-n $modules -d zend_extension=%{buildroot}%{php_extdir}/%{pecl_name}.so -d xdebug.auto_trace=0" \ NO_INTERACTION=1 \ REPORT_EXIT_STATUS=1 \ %{__php} -n run-tests.php --show-diff @@ -291,6 +292,9 @@ fi %changelog +* Wed Oct 18 2017 Remi Collet - 2.5.5-3 +- fix test suite + * Mon Oct 2 2017 Remi Collet - 2.5.5-2 - F27 rebuild -- cgit