Fix run-tests.php for explicitly given test cases

The recent improvement to list skipped extensions explicitly[1] missed
to properly initialize `$ignored_by_ext` for the case where an explicit
set of test cases are given; this was not a problem previously, since
the undefined *global* variable was coerced to int.  We fix this by
initializing the variable earlier.

[1] <baef47ef3e>

Closes GH-9617.
This commit is contained in:
Christoph M. Becker 2022-09-27 11:49:08 +02:00
parent 01677cafae
commit 4ed01e3296
No known key found for this signature in database
GPG key ID: D66C9593118BCCB6

View file

@ -362,6 +362,7 @@ function main(): void
$context_line_count = 3; $context_line_count = 3;
$num_repeats = 1; $num_repeats = 1;
$show_progress = true; $show_progress = true;
$ignored_by_ext = [];
$cfgtypes = ['show', 'keep']; $cfgtypes = ['show', 'keep'];
$cfgfiles = ['skip', 'php', 'clean', 'out', 'diff', 'exp', 'mem']; $cfgfiles = ['skip', 'php', 'clean', 'out', 'diff', 'exp', 'mem'];
@ -735,7 +736,6 @@ function main(): void
$test_files = []; $test_files = [];
$exts_tested = $exts_to_test; $exts_tested = $exts_to_test;
$exts_skipped = []; $exts_skipped = [];
$ignored_by_ext = [];
sort($exts_to_test); sort($exts_to_test);
$test_dirs = []; $test_dirs = [];
$optionals = ['Zend', 'tests', 'ext', 'sapi']; $optionals = ['Zend', 'tests', 'ext', 'sapi'];