summaryrefslogtreecommitdiffstats
path: root/php-pecl-datadog-trace.spec
diff options
context:
space:
mode:
authorRemi Collet <remi@remirepo.net>2024-09-06 09:56:50 +0200
committerRemi Collet <remi@php.net>2024-09-06 09:56:50 +0200
commit787034ce69948608e83604721bef863fb247e86f (patch)
treeb845db2a4cd32d5d141fdf4106f591a0a58ed3a6 /php-pecl-datadog-trace.spec
parent148294fdaffb831da7213216bbe432d8f7c2ade8 (diff)
test build for upcoming 1.4.0
Diffstat (limited to 'php-pecl-datadog-trace.spec')
-rw-r--r--php-pecl-datadog-trace.spec61
1 files changed, 30 insertions, 31 deletions
diff --git a/php-pecl-datadog-trace.spec b/php-pecl-datadog-trace.spec
index 05e74ae..aeb2d5a 100644
--- a/php-pecl-datadog-trace.spec
+++ b/php-pecl-datadog-trace.spec
@@ -30,17 +30,21 @@
# extension name
%global pecl_name ddtrace
-%global upstream_version 1.3.0
+%global upstream_version 1.4.0
#global upstream_prever beta1
%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}}
%global ini_name 40-%{pecl_name}.ini
%global sources %{proj_name}-%{upstream_version}%{?upstream_prever}
%global _configure ../%{sources}/configure
+# if needed for test build
+#undefine _hardened_build
+#undefine _lto_cflags
+
Summary: APM and distributed tracing for PHP
Name: %{?scl_prefix}php-pecl-datadog-trace
Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}}
-Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
+Release: 0%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}}
# extension is dual-licensed under Apache 2.0 or BSD3.
# bundled rust ext are MIT AND Apache-2.0
License: (Apache-2.0 OR BSD-3-Clause) AND MIT AND Apache-2.0
@@ -77,9 +81,6 @@ BuildRequires: libssh2
Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api}
Requires: %{?scl_prefix}php(api) = %{php_core_api}
Requires: %{?scl_prefix}php-json%{?_isa}
-%if "%{php_version}" > "8.0"
-Requires: %{?scl_prefix}php-curl%{?_isa}
-%endif
Provides: %{?scl_prefix}php-%{pecl_name} = %{version}
Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version}
@@ -114,7 +115,7 @@ sed -e 's:@php_dir@:%{pear_phpdir}:' \
extver=$(cat VERSION)
if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then
: Error: Upstream extension version is ${extver}, expecting %{upstream_version}%{?upstream_prever}.
- exit 1
+ #exit 1
fi
cd ..
@@ -212,49 +213,30 @@ done
%check
cd %{sources}
-export DD_TRACE_CLI_ENABLED=1
-export DD_INSTRUMENTATION_TELEMETRY_ENABLED=0
-# Erratic results
-rm tests/ext/segfault_backtrace_*.phpt
-rm tests/ext/sandbox/memory_limit_graceful_bailout.phpt
-%if "%{php_version}" > "8.0"
-rm tests/ext/sandbox/fatal_errors_are_tracked_005.phpt
-%endif
# XFAIL
find tests/ -type f -exec grep -q -- '--XFAIL--' {} \; -delete -print
-# https://github.com/DataDog/dd-trace-php/issues/2115
-rm -r tests/ext/telemetry
-# https://github.com/DataDog/dd-trace-php/issues/2248
-rm tests/ext/force_flush_traces.phpt
-rm tests/ext/sandbox/fatal_errors_ignored_in_tracing_closure.phpt
# DEP for ext dependencies, MOD for ext used in tests
DEP=""
-MOD="-n -d ddtrace.request_init_hook="
+MOD=""
OPT="-q --show-diff"
%if "%{php_version}" > "8.0"
OPT="$OPT %{?_smp_mflags}"
-[ -f %{php_extdir}/curl.so ] && DEP="$DEP -d extension=curl.so"
-%else
-[ -f %{php_extdir}/curl.so ] && MOD="$MOD -d extension=curl.so"
%endif
+# Extension dependency
[ -f %{php_extdir}/json.so ] && DEP="$DEP -d extension=json.so"
+# Used by test suite
+[ -f %{php_extdir}/curl.so ] && MOD="$MOD -d extension=curl.so"
[ -f %{php_extdir}/posix.so ] && MOD="$MOD -d extension=posix.so"
+export DD_INSTRUMENTATION_TELEMETRY_ENABLED=0
+
: Minimal load test for NTS extension
%{__php} --no-php-ini $DEP \
--define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \
--modules | grep -i '^%{pecl_name}$'
-%if %{with tests}
-: Upstream test suite for NTS extension
-TEST_PHP_EXECUTABLE=%{_bindir}/php \
-TEST_PHP_ARGS="$DEP $MOD -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \
-REPORT_EXIT_STATUS=1 \
-%{_bindir}/php -n run-tests.php $OPT
-%endif
-
%if %{with_zts}
: Minimal load test for ZTS extension
%{__ztsphp} --no-php-ini $DEP \
@@ -262,6 +244,20 @@ REPORT_EXIT_STATUS=1 \
--modules | grep -i '^%{pecl_name}$'
%endif
+%if %{with tests}
+export DD_TRACE_CLI_ENABLED=1
+export DD_INSTRUMENTATION_TELEMETRY_ENABLED=1
+#export DD_TRACE_LOG_LEVEL=trace
+#export DD_TRACE_LOG_FILE=$PWD/logfile.log
+#export RUST_BACKTRACE=1
+
+: Upstream test suite for NTS extension
+TEST_PHP_EXECUTABLE=%{_bindir}/php \
+TEST_PHP_ARGS="-n $DEP $MOD -d extension=$PWD/../NTS/modules/%{pecl_name}.so" \
+REPORT_EXIT_STATUS=1 \
+%{_bindir}/php -n run-tests.php $OPT
+%endif
+
%files
%doc %{pecl_docdir}/%{pecl_name}
@@ -280,6 +276,9 @@ REPORT_EXIT_STATUS=1 \
%changelog
+* Fri Sep 6 2024 Remi Collet <remi@remirepo.net> - 1.4.0-0
+- test build for upcoming 1.4.0
+
* Fri Aug 30 2024 Remi Collet <remi@remirepo.net> - 1.3.0-1
- update to 1.3.0
- open https://github.com/DataDog/dd-trace-php/issues/2825 offline build