dev-lang/php: Fix location of TEST_PHP_EXECUTABLE for FPM SAPI

The test suite for the FPM SAPI derives the location of the php-fpm
binary from TEST_PHP_EXECUTABLE. Due to our build directory layout, the
executable path can't be resolved properly.

Worked around by providing a new TEST_PHP_FPM_EXECUTABLE variable we
expose to the test suite.

Signed-off-by: Lothar Serra Mari <mail@serra.me>
Signed-off-by: Michael Orlitzky <mjo@gentoo.org>
This commit is contained in:
Lothar Serra Mari
2026-08-10 21:38:19 -04:00
committed by Michael Orlitzky
parent 764f2db1d7
commit d0f6312e3e
3 changed files with 23 additions and 0 deletions
@@ -0,0 +1,13 @@
diff --git a/sapi/fpm/tests/tester.inc b/sapi/fpm/tests/tester.inc
index 90798865433..91ba564edf8 100644
--- a/sapi/fpm/tests/tester.inc
+++ b/sapi/fpm/tests/tester.inc
@@ -225,7 +225,7 @@ class Tester
*/
static public function findExecutable(): bool|string
{
- $phpPath = getenv("TEST_PHP_EXECUTABLE");
+ $phpPath = getenv("TEST_PHP_FPM_EXECUTABLE");
for ($i = 0; $i < 2; $i++) {
$slashPosition = strrpos($phpPath, "/");
if ($slashPosition) {
+5
View File
@@ -135,6 +135,7 @@ DEPEND="${COMMON_DEPEND}
BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}/php-set-fpm-test-executable.patch"
"${FILESDIR}/php-8.3.31-ipv6-printing-test-fix.patch"
)
@@ -729,6 +730,10 @@ src_test() {
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
fi
if [[ -x "${WORKDIR}/sapis-build/fpm/sapi/fpm/php-fpm" ]] ; then
export TEST_PHP_FPM_EXECUTABLE="${WORKDIR}/sapis-build/fpm/sapi/fpm/php-fpm"
fi
if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
fi
+5
View File
@@ -136,6 +136,7 @@ DEPEND="${COMMON_DEPEND}
BDEPEND="virtual/pkgconfig"
PATCHES=(
"${FILESDIR}/php-set-fpm-test-executable.patch"
"${FILESDIR}/php-8.3.31-ipv6-printing-test-fix.patch"
)
@@ -728,6 +729,10 @@ src_test() {
export TEST_PHP_CGI_EXECUTABLE="${WORKDIR}/sapis-build/cgi/sapi/cgi/php-cgi"
fi
if [[ -x "${WORKDIR}/sapis-build/fpm/sapi/fpm/php-fpm" ]] ; then
export TEST_PHP_FPM_EXECUTABLE="${WORKDIR}/sapis-build/fpm/sapi/fpm/php-fpm"
fi
if [[ -x "${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg" ]] ; then
export TEST_PHPDBG_EXECUTABLE="${WORKDIR}/sapis-build/phpdbg/sapi/phpdbg/phpdbg"
fi