summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2020-09-19 08:26:14 +0200
committerRemi Collet <remi@remirepo.net>2020-09-19 08:26:14 +0200
commit7d72f710a3b59940dc70deb97e5afc6e7f46489b (patch)
treea205aa16d7b9fa23524bddd354e70371c8341309
parent096ee7e1b2d533408a01f6a875d5c2aa60c3b352 (diff)
update to 2.2.1 (beta)
enable upstream test suite
-rw-r--r--PHPINFO2
-rw-r--r--REFLECTION2
-rw-r--r--php-pecl-xhprof.spec40
3 files changed, 34 insertions, 10 deletions
diff --git a/PHPINFO b/PHPINFO
index ebe2afd..63e4d90 100644
--- a/PHPINFO
+++ b/PHPINFO
@@ -2,7 +2,7 @@
xhprof
xhprof support => enabled
-Version => 2.2.0
+Version => 2.2.1-dev
Directive => Local Value => Master Value
xhprof.output_dir => no value => no value
diff --git a/REFLECTION b/REFLECTION
index 2a842d9..8c6df26 100644
--- a/REFLECTION
+++ b/REFLECTION
@@ -1,4 +1,4 @@
-Extension [ <persistent> extension #113 xhprof version 2.2.0 ] {
+Extension [ <persistent> extension #117 xhprof version 2.2.1-dev ] {
- INI {
Entry [ xhprof.output_dir <ALL> ]
diff --git a/php-pecl-xhprof.spec b/php-pecl-xhprof.spec
index 5115f84..4add7cd 100644
--- a/php-pecl-xhprof.spec
+++ b/php-pecl-xhprof.spec
@@ -9,6 +9,9 @@
#
# Please, preserve the changelog entries
#
+
+%bcond_without tests
+
%if 0%{?scl:1}
%global sub_prefix %{scl_prefix}
%scl_package php-pecl-xhprof
@@ -22,7 +25,7 @@
%global ini_name 40-%{pecl_name}.ini
Name: %{?sub_prefix}php-pecl-xhprof
-Version: 2.2.0
+Version: 2.2.1
Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
Summary: PHP extension for XHProf, a Hierarchical Profiler
@@ -48,19 +51,16 @@ Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version}
Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release}
Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release}
-%if "%{?vendor}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
+%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel}
# Other third party repo stuff
-%if "%{php_version}" > "7.2"
-Obsoletes: php72u-pecl-%{pecl_name} <= %{version}
-Obsoletes: php72w-pecl-%{pecl_name} <= %{version}
-%endif
%if "%{php_version}" > "7.3"
Obsoletes: php73-pecl-%{pecl_name} <= %{version}
-Obsoletes: php73w-pecl-%{pecl_name} <= %{version}
%endif
%if "%{php_version}" > "7.4"
Obsoletes: php74-pecl-%{pecl_name} <= %{version}
-Obsoletes: php74w-pecl-%{pecl_name} <= %{version}
+%endif
+%if "%{php_version}" > "8.0"
+Obsoletes: php80-pecl-%{pecl_name} <= %{version}
%endif
%endif
@@ -117,6 +117,16 @@ sed -e 's/role="php"/role="src"/' \
%{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \
-i package.xml
+pushd %{pecl_name}-%{version}/extension
+sed -e '/XHPROF_VERSION/s/2.2.1-dev/2.2.1/' -i php_xhprof.h
+# Sanity check, really often broken
+extver=$(sed -n '/#define XHPROF_VERSION/{s/.* "//;s/".*$//;p}' php_xhprof.h)
+if test "x${extver}" != "x%{version}"; then
+ : Error: Upstream extension version is ${extver}, expecting %{version}.
+ exit 1
+fi
+popd
+
# Extension configuration file
cat >%{ini_name} <<EOF
; Enable %{pecl_name} extension module
@@ -217,6 +227,16 @@ done
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep %{pecl_name}
+%if %{with tests}
+cd %{pecl_name}-%{version}/extension
+: Upstream test suite for NTS extension
+TEST_PHP_EXECUTABLE=%{__php} \
+TEST_PHP_ARGS="-n -d extension=%{buildroot}%{php_extdir}/%{pecl_name}.so" \
+NO_INTERACTION=1 \
+REPORT_EXIT_STATUS=1 \
+%{__php} -n run-tests.php --show-diff
+%endif
+
%if %{with_zts}
: simple module load TEST for ZTS extension
%{__ztsphp} --no-php-ini \
@@ -271,6 +291,10 @@ fi
%changelog
+* Sat Sep 19 2020 Remi Collet <remi@remirepo.net> - 2.2.1-1
+- update to 2.2.1 (beta)
+- enable upstream test suite
+
* Sat Apr 11 2020 Remi Collet <remi@remirepo.net> - 2.2.0-1
- update to 2.2.0