Skip to content

Commit 263b426

Browse files
committed
rm always empty ignored_by_ext global var
1 parent 6af1862 commit 263b426

File tree

1 file changed

+8
-15
lines changed

1 file changed

+8
-15
lines changed

run-tests.php

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ function main(): void
154154
global $DETAILED, $PHP_FAILED_TESTS, $SHOW_ONLY_GROUPS, $argc, $argv, $cfg,
155155
$cfgfiles, $cfgtypes, $conf_passed, $end_time, $environment,
156156
$exts_to_test, $failed_tests_file,
157-
$ignored_by_ext, $ini_overwrites, $is_switch, $colorize,
157+
$ini_overwrites, $is_switch, $colorize,
158158
$log_format, $matches, $no_clean, $no_file_cache,
159159
$optionals, $pass_option_n, $pass_options,
160160
$pattern_match, $php, $php_cgi, $phpdbg, $preload, $redir_tests,
@@ -735,7 +735,6 @@ function main(): void
735735
} else {
736736
// Compile a list of all test files (*.phpt).
737737
$test_files = [];
738-
$ignored_by_ext = [];
739738
sort($exts_to_test);
740739
$test_dirs = [];
741740
$optionals = ['Zend', 'tests', 'ext', 'sapi'];
@@ -752,11 +751,11 @@ function main(): void
752751
}
753752

754753
foreach ($test_dirs as $dir) {
755-
find_files(TEST_PHP_SRCDIR . "/{$dir}", $dir == 'ext');
754+
find_files(TEST_PHP_SRCDIR . "/{$dir}");
756755
}
757756

758757
foreach ($user_tests as $dir) {
759-
find_files($dir, $dir == 'ext');
758+
find_files($dir);
760759
}
761760

762761
$test_files = array_unique($test_files);
@@ -1045,9 +1044,9 @@ function get_binary(string $php, string $sapi, string $sapi_path): ?string
10451044
return null;
10461045
}
10471046

1048-
function find_files(string $dir, bool $is_ext_dir = false, bool $ignore = false): void
1047+
function find_files(string $dir): void
10491048
{
1050-
global $test_files, $ignored_by_ext;
1049+
global $test_files;
10511050

10521051
$o = opendir($dir) or error("cannot open directory: $dir");
10531052

@@ -1057,7 +1056,7 @@ function find_files(string $dir, bool $is_ext_dir = false, bool $ignore = false)
10571056
}
10581057

10591058
if (is_dir("{$dir}/{$name}")) {
1060-
find_files("{$dir}/{$name}", false, $ignore);
1059+
find_files("{$dir}/{$name}");
10611060
}
10621061

10631062
// Cleanup any left-over tmp files from last run.
@@ -1071,11 +1070,7 @@ function find_files(string $dir, bool $is_ext_dir = false, bool $ignore = false)
10711070
// many platforms)
10721071
if (substr($name, -5) == '.phpt' && substr($name, 0, 1) !== '.') {
10731072
$testfile = realpath("{$dir}/{$name}");
1074-
if ($ignore) {
1075-
$ignored_by_ext[] = $testfile;
1076-
} else {
1077-
$test_files[] = $testfile;
1078-
}
1073+
$test_files[] = $testfile;
10791074
}
10801075
}
10811076

@@ -3029,10 +3024,9 @@ function settings2params(array $ini_settings): string
30293024

30303025
function compute_summary(): void
30313026
{
3032-
global $n_total, $test_results, $ignored_by_ext, $sum_results, $percent_results;
3027+
global $n_total, $test_results, $sum_results, $percent_results;
30333028

30343029
$n_total = count($test_results);
3035-
$n_total += count($ignored_by_ext);
30363030
$sum_results = [
30373031
'PASSED' => 0,
30383032
'WARNED' => 0,
@@ -3048,7 +3042,6 @@ function compute_summary(): void
30483042
$sum_results[$v]++;
30493043
}
30503044

3051-
$sum_results['SKIPPED'] += count($ignored_by_ext);
30523045
$percent_results = [];
30533046

30543047
foreach ($sum_results as $v => $n) {

0 commit comments

Comments
 (0)