Skip to content

Commit e0b79cd

Browse files
committed
Introduce FPM_TEST_DEBUG_FILTER env var and extend multi request tracing
1 parent 4bfe69b commit e0b79cd

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

sapi/fpm/tests/tester.inc

+10-5
Original file line numberDiff line numberDiff line change
@@ -401,11 +401,15 @@ class Tester
401401
bool $debug = null,
402402
string $clientTransport = 'stream'
403403
) {
404-
$this->configTemplate = $configTemplate;
405-
$this->code = $code;
406-
$this->options = $options;
407-
$this->fileName = $fileName ?: self::getCallerFileName();
408-
$this->debug = $debug !== null ? $debug : (bool)getenv('TEST_FPM_DEBUG');
404+
$this->configTemplate = $configTemplate;
405+
$this->code = $code;
406+
$this->options = $options;
407+
$this->fileName = $fileName ?: self::getCallerFileName();
408+
if (($debugFilter = getenv('TEST_FPM_DEBUG_FILTER')) !== false) {
409+
$this->debug = str_contains(basename($this->fileName), $debugFilter);
410+
} else {
411+
$this->debug = $debug !== null ? $debug : (bool)getenv('TEST_FPM_DEBUG');
412+
}
409413
$this->logReader = new LogReader($this->debug);
410414
$this->logTool = new LogTool($this->logReader, $this->debug);
411415
$this->clientTransport = $clientTransport;
@@ -930,6 +934,7 @@ class Tester
930934
$requestData['headers'] ?? [],
931935
$requestData['uri'] ?? null
932936
);
937+
$this->trace('Request params', $params);
933938

934939
if (isset($requestData['delay'])) {
935940
usleep($requestData['delay']);

0 commit comments

Comments
 (0)