Skip to content

Commit e749632

Browse files
committed
List skipped extensions explicitly
1 parent 3f12d26 commit e749632

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

run-tests.php

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -736,9 +736,9 @@ function main(): void
736736
} else {
737737
// Compile a list of all test files (*.phpt).
738738
$test_files = [];
739-
$exts_tested = count($exts_to_test);
740-
$exts_skipped = 0;
741-
$ignored_by_ext = 0;
739+
$exts_tested = $exts_to_test;
740+
$exts_skipped = [];
741+
$ignored_by_ext = [];
742742
sort($exts_to_test);
743743
$test_dirs = [];
744744
$optionals = ['Zend', 'tests', 'ext', 'sapi'];
@@ -1087,7 +1087,7 @@ function find_files(string $dir, bool $is_ext_dir = false, bool $ignore = false)
10871087
if (is_dir("{$dir}/{$name}") && !in_array($name, ['.', '..', '.svn'])) {
10881088
$skip_ext = ($is_ext_dir && !in_array(strtolower($name), $exts_to_test));
10891089
if ($skip_ext) {
1090-
$exts_skipped++;
1090+
$exts_skipped[] = $name;
10911091
}
10921092
find_files("{$dir}/{$name}", false, $ignore || $skip_ext);
10931093
}
@@ -1102,10 +1102,10 @@ function find_files(string $dir, bool $is_ext_dir = false, bool $ignore = false)
11021102
// (but not those starting with a dot, which are hidden on
11031103
// many platforms)
11041104
if (substr($name, -5) == '.phpt' && substr($name, 0, 1) !== '.') {
1105+
$testfile = realpath("{$dir}/{$name}");
11051106
if ($ignore) {
1106-
$ignored_by_ext++;
1107+
$ignored_by_ext[] = $testfile;
11071108
} else {
1108-
$testfile = realpath("{$dir}/{$name}");
11091109
$test_files[] = $testfile;
11101110
}
11111111
}
@@ -3097,7 +3097,7 @@ function compute_summary(): void
30973097
global $n_total, $test_results, $ignored_by_ext, $sum_results, $percent_results;
30983098

30993099
$n_total = count($test_results);
3100-
$n_total += $ignored_by_ext;
3100+
$n_total += count($ignored_by_ext);
31013101
$sum_results = [
31023102
'PASSED' => 0,
31033103
'WARNED' => 0,
@@ -3113,7 +3113,7 @@ function compute_summary(): void
31133113
$sum_results[$v]++;
31143114
}
31153115

3116-
$sum_results['SKIPPED'] += $ignored_by_ext;
3116+
$sum_results['SKIPPED'] += count($ignored_by_ext);
31173117
$percent_results = [];
31183118

31193119
foreach ($sum_results as $v => $n) {
@@ -3145,8 +3145,8 @@ function get_summary(bool $show_ext_summary): string
31453145
=====================================================================
31463146
TEST RESULT SUMMARY
31473147
---------------------------------------------------------------------
3148-
Exts skipped : ' . sprintf('%4d', $exts_skipped) . '
3149-
Exts tested : ' . sprintf('%4d', $exts_tested) . '
3148+
Exts skipped : ' . sprintf('%4d', count($exts_skipped)) . ' (' . implode(', ', $exts_skipped) . ')
3149+
Exts tested : ' . sprintf('%4d', count($exts_tested)) . '
31503150
---------------------------------------------------------------------
31513151
';
31523152
}

0 commit comments

Comments
 (0)