Skip to content

Commit 3c07f82

Browse files
committed
Don't overwrite INI section
1 parent 5c64d97 commit 3c07f82

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

run-tests.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1292,7 +1292,7 @@ function run_all_tests($test_files, $env, $redir_tested = null)
12921292
/* Automatically skip opcache tests in --file-cache mode,
12931293
* because opcache generally doesn't expect those to run under file cache */
12941294
$test_files = array_filter($test_files, function($path) {
1295-
return false !== strpos('ext/opcache', $path);
1295+
return false === strpos($path, 'ext/opcache');
12961296
});
12971297
}
12981298

@@ -2128,16 +2128,6 @@ function run_test($php, $file, $env)
21282128

21292129
$orig_ini_settings = settings2params($ini_settings);
21302130

2131-
// Any special ini settings
2132-
// these may overwrite the test defaults...
2133-
if (array_key_exists('INI', $section_text)) {
2134-
$section_text['INI'] = str_replace('{PWD}', dirname($file), $section_text['INI']);
2135-
$section_text['INI'] = str_replace('{TMP}', sys_get_temp_dir(), $section_text['INI']);
2136-
$replacement = IS_WINDOWS ? '"' . PHP_BINARY . ' -r \"while ($in = fgets(STDIN)) echo $in;\" > $1"' : 'tee $1 >/dev/null';
2137-
$section_text['INI'] = preg_replace('/{MAIL:(\S+)}/', $replacement, $section_text['INI']);
2138-
settings2array(preg_split("/[\n\r]+/", $section_text['INI']), $ini_settings);
2139-
}
2140-
21412131
if ($file_cache !== null) {
21422132
$ini_settings['opcache.file_cache'] = '/tmp';
21432133
// Make sure warnings still show up on the second run.
@@ -2151,6 +2141,16 @@ function run_test($php, $file, $env)
21512141
}
21522142
}
21532143

2144+
// Any special ini settings
2145+
// these may overwrite the test defaults...
2146+
if (array_key_exists('INI', $section_text)) {
2147+
$section_text['INI'] = str_replace('{PWD}', dirname($file), $section_text['INI']);
2148+
$section_text['INI'] = str_replace('{TMP}', sys_get_temp_dir(), $section_text['INI']);
2149+
$replacement = IS_WINDOWS ? '"' . PHP_BINARY . ' -r \"while ($in = fgets(STDIN)) echo $in;\" > $1"' : 'tee $1 >/dev/null';
2150+
$section_text['INI'] = preg_replace('/{MAIL:(\S+)}/', $replacement, $section_text['INI']);
2151+
settings2array(preg_split("/[\n\r]+/", $section_text['INI']), $ini_settings);
2152+
}
2153+
21542154
$ini_settings = settings2params($ini_settings);
21552155

21562156
$env['TEST_PHP_EXTRA_ARGS'] = $pass_options . ' ' . $ini_settings;

0 commit comments

Comments
 (0)