summaryrefslogtreecommitdiff
path: root/run-tests.php
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2017-08-19 02:01:03 +0200
committerAnatol Belski <ab@php.net>2017-08-19 02:01:03 +0200
commit97ed208cfd556574e06e98305b9a4cb002891a3f (patch)
tree4bcca39c8362d4b75e15ebf2843cebd3d24fbb1d /run-tests.php
parent5ef63b6f0ea3f98537d6fba7ae28f7d1c3e6fbfd (diff)
parent71b12940d0349e58f8719a22e0d4667f19c13dcf (diff)
downloadphp-git-97ed208cfd556574e06e98305b9a4cb002891a3f.tar.gz
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0: Fix issues with phpt and EXTENSION on windows (BUG 75042)
Diffstat (limited to 'run-tests.php')
-rwxr-xr-xrun-tests.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/run-tests.php b/run-tests.php
index 1991b56a08..4f0c793260 100755
--- a/run-tests.php
+++ b/run-tests.php
@@ -1504,15 +1504,19 @@ TEST $file
// Additional required extensions
if (array_key_exists('EXTENSIONS', $section_text)) {
- $ext_dir=`$php -r 'echo ini_get("extension_dir");'`;
+ $ext_params = array();
+ settings2array($ini_overwrites, $ext_params);
+ settings2params($ext_params);
+ $ext_dir=`$php $pass_options $ext_params -d display_errors=0 -r "echo ini_get('extension_dir');"`;
$extensions = preg_split("/[\n\r]+/", trim($section_text['EXTENSIONS']));
- $loaded = explode(",", `$php -n -r 'echo join(",", get_loaded_extensions());'`);
+ $loaded = explode(",", `$php $pass_options $ext_params -d display_errors=0 -r "echo implode(',', get_loaded_extensions());"`);
+ $ext_prefix = substr(PHP_OS, 0, 3) === "WIN" ? "php_" : "";
foreach ($extensions as $req_ext) {
if (!in_array($req_ext, $loaded)) {
if ($req_ext == 'opcache') {
- $ini_settings['zend_extension'][] = $ext_dir . DIRECTORY_SEPARATOR . $req_ext . '.' . PHP_SHLIB_SUFFIX;
+ $ini_settings['zend_extension'][] = $ext_dir . DIRECTORY_SEPARATOR . $ext_prefix . $req_ext . '.' . PHP_SHLIB_SUFFIX;
} else {
- $ini_settings['extension'][] = $ext_dir . DIRECTORY_SEPARATOR . $req_ext . '.' . PHP_SHLIB_SUFFIX;
+ $ini_settings['extension'][] = $ext_dir . DIRECTORY_SEPARATOR . $ext_prefix . $req_ext . '.' . PHP_SHLIB_SUFFIX;
}
}
}