}
/* For phpdbg tests, check if phpdbg sapi is available and if it is, use it. */
+ $extra_options = '';
if (array_key_exists('PHPDBG', $section_text)) {
if (!isset($section_text['STDIN'])) {
$section_text['STDIN'] = $section_text['PHPDBG']."\n";
if (isset($phpdbg)) {
$php = $phpdbg . ' -qIb';
+
+ // Additional phpdbg command line options for sections that need to
+ // be run straight away. For example, EXTENSIONS, SKIPIF, CLEAN.
+ $extra_options = '-rr';
} else {
show_result('SKIP', $tested, $tested_file, "reason: phpdbg not available");
$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');"`;
+ $ext_dir=`$php $pass_options $extra_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 $pass_options $ext_params -d display_errors=0 -r "echo implode(',', get_loaded_extensions());"`);
+ $loaded = explode(",", `$php $pass_options $extra_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)) {
junit_start_timer($shortname);
- $output = system_with_timeout("$extra $php $pass_options -q $ini_settings $no_file_cache -d display_errors=0 \"$test_skipif\"", $env);
+ $output = system_with_timeout("$extra $php $pass_options $extra_options -q $ini_settings $no_file_cache -d display_errors=0 \"$test_skipif\"", $env);
junit_finish_timer($shortname);
settings2params($clean_params);
$extra = substr(PHP_OS, 0, 3) !== "WIN" ?
"unset REQUEST_METHOD; unset QUERY_STRING; unset PATH_TRANSLATED; unset SCRIPT_FILENAME; unset REQUEST_METHOD;": "";
- system_with_timeout("$extra $php $pass_options -q $clean_params $no_file_cache \"$test_clean\"", $env);
+ system_with_timeout("$extra $php $pass_options $extra_options -q $clean_params $no_file_cache \"$test_clean\"", $env);
}
if (!$cfg['keep']['clean']) {