From 33714e6d82243e3adca9c0fbf754f6661f09e40a Mon Sep 17 00:00:00 2001 From: Derick Rethans Date: Tue, 6 Dec 2011 05:44:54 +0000 Subject: [PATCH] This changes adds the --EXTENSION-- section to .phpt files as described in http://marc.info/?t=132248616300007&r=1&w=2. --- run-tests.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/run-tests.php b/run-tests.php index 39686ce6c3..3e22a9556e 100755 --- a/run-tests.php +++ b/run-tests.php @@ -1483,6 +1483,18 @@ TEST $file settings2array(preg_split( "/[\n\r]+/", $section_text['INI']), $ini_settings); } + // Additional required extensions + if (array_key_exists('EXTENSIONS', $section_text)) { + $ext_dir=`$php -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());'`); + foreach ($extensions as $req_ext) { + if (!in_array($req_ext, $loaded)) { + $ini_settings['extension'][] = $ext_dir . DIRECTORY_SEPARATOR . $req_ext . '.' . PHP_SHLIB_SUFFIX; + } + } + } + settings2params($ini_settings); // Check if test should be skipped. -- 2.40.0