Skip to content

Commit ea2ee60

Browse files
tstarlingbukka
authored andcommitted
When running FPM tests, pass -n option to php-fpm
"make test" was failing for me, because I was running it prior to install, and there was an old installed version which was incompatible. The FPM tests were using the installed php.ini which referenced installed dynamically linked extensions. So, pass -n to php-fpm. FPM\Tester::start() has $extensions, $iniEntries and TEST_FPM_EXTENSION_DIR but they are not actually set by anything. Rather than rely on the installed php.ini to be correct, it seems safer to pass -n, and any tests that need specific config can pass $iniEntries. Closes GH-11373
1 parent 1fa5d30 commit ea2ee60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sapi/fpm/tests/tester.inc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ class Tester
385385
public function testConfig($silent = false)
386386
{
387387
$configFile = $this->createConfig();
388-
$cmd = self::findExecutable() . ' -tt -y ' . $configFile . ' 2>&1';
388+
$cmd = self::findExecutable() . ' -n -tt -y ' . $configFile . ' 2>&1';
389389
$this->trace('Testing config using command', $cmd, true);
390390
exec($cmd, $output, $code);
391391
if ($code) {
@@ -426,7 +426,7 @@ class Tester
426426
$configFile = $this->createConfig();
427427
$desc = $this->outDesc ? [] : [1 => array('pipe', 'w'), 2 => array('redirect', 1)];
428428

429-
$cmd = [self::findExecutable(), '-y', $configFile];
429+
$cmd = [self::findExecutable(), '-n', '-y', $configFile];
430430

431431
if ($forceStderr) {
432432
$cmd[] = '-O';

0 commit comments

Comments
 (0)