mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Adjust run-tests.php to dynamic extension loading
PR #6787 changed the behavior of the `--EXTENSIONS--` section, so that not yet loaded extensions are dynamically loaded if possible. However, when no tests are specified for the runner, only tests for already loaded extensions are run, what defeats the purpose of the improvement of the `--EXTENSIONS--` behavior. We cater to that by detecting loadable extensions, and also run their tests.
This commit is contained in:
parent
f57526a07a
commit
6f89da78d0
1 changed files with 16 additions and 3 deletions
|
@ -860,9 +860,22 @@ More .INIs : " , (function_exists(\'php_ini_scanned_files\') ? str_replace("\n"
|
|||
}
|
||||
@unlink($info_file);
|
||||
|
||||
// load list of enabled extensions
|
||||
save_text($info_file,
|
||||
'<?php echo str_replace("Zend OPcache", "opcache", implode(",", get_loaded_extensions())); ?>');
|
||||
// load list of enabled and loadable extensions
|
||||
save_text($info_file, <<<'PHP'
|
||||
<?php
|
||||
echo str_replace("Zend OPcache", "opcache", implode(",", get_loaded_extensions()));
|
||||
$ext_dir = ini_get("extension_dir");
|
||||
foreach (scandir($ext_dir) as $file) {
|
||||
if (!preg_match('/^(?:php_)?([_a-zA-Z0-9]+)\.(?:so|dll)$/', $file, $matches)) {
|
||||
continue;
|
||||
}
|
||||
$ext = $matches[1];
|
||||
if (!extension_loaded($ext) && @dl($file)) {
|
||||
echo ",", $ext;
|
||||
}
|
||||
}
|
||||
?>
|
||||
PHP);
|
||||
$exts_to_test = explode(',', `$php $pass_options $info_params $no_file_cache "$info_file"`);
|
||||
// check for extensions that need special handling and regenerate
|
||||
$info_params_ex = [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue