Skip to content

Commit f4c766f

Browse files
committed
List skipped extensions explicitly
1 parent 6904019 commit f4c766f

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
@@ -735,9 +735,9 @@ function main(): void
735735
} else {
736736
// Compile a list of all test files (*.phpt).
737737
$test_files = [];
738-
$exts_tested = count($exts_to_test);
739-
$exts_skipped = 0;
740-
$ignored_by_ext = 0;
738+
$exts_tested = $exts_to_test;
739+
$exts_skipped = [];
740+
$ignored_by_ext = [];
741741
sort($exts_to_test);
742742
$test_dirs = [];
743743
$optionals = ['Zend', 'tests', 'ext', 'sapi'];
@@ -1053,7 +1053,7 @@ function find_files(string $dir, bool $is_ext_dir = false, bool $ignore = false)
10531053
if (is_dir("{$dir}/{$name}") && !in_array($name, ['.', '..', '.svn'])) {
10541054
$skip_ext = ($is_ext_dir && !in_array(strtolower($name), $exts_to_test));
10551055
if ($skip_ext) {
1056-
$exts_skipped++;
1056+
$exts_skipped[] = $name;
10571057
}
10581058
find_files("{$dir}/{$name}", false, $ignore || $skip_ext);
10591059
}
@@ -1068,10 +1068,10 @@ function find_files(string $dir, bool $is_ext_dir = false, bool $ignore = false)
10681068
// (but not those starting with a dot, which are hidden on
10691069
// many platforms)
10701070
if (substr($name, -5) == '.phpt' && substr($name, 0, 1) !== '.') {
1071+
$testfile = realpath("{$dir}/{$name}");
10711072
if ($ignore) {
1072-
$ignored_by_ext++;
1073+
$ignored_by_ext[] = $testfile;
10731074
} else {
1074-
$testfile = realpath("{$dir}/{$name}");
10751075
$test_files[] = $testfile;
10761076
}
10771077
}
@@ -3030,7 +3030,7 @@ function compute_summary(): void
30303030
global $n_total, $test_results, $ignored_by_ext, $sum_results, $percent_results;
30313031

30323032
$n_total = count($test_results);
3033-
$n_total += $ignored_by_ext;
3033+
$n_total += count($ignored_by_ext);
30343034
$sum_results = [
30353035
'PASSED' => 0,
30363036
'WARNED' => 0,
@@ -3046,7 +3046,7 @@ function compute_summary(): void
30463046
$sum_results[$v]++;
30473047
}
30483048

3049-
$sum_results['SKIPPED'] += $ignored_by_ext;
3049+
$sum_results['SKIPPED'] += count($ignored_by_ext);
30503050
$percent_results = [];
30513051

30523052
foreach ($sum_results as $v => $n) {
@@ -3078,8 +3078,8 @@ function get_summary(bool $show_ext_summary): string
30783078
=====================================================================
30793079
TEST RESULT SUMMARY
30803080
---------------------------------------------------------------------
3081-
Exts skipped : ' . sprintf('%4d', $exts_skipped) . '
3082-
Exts tested : ' . sprintf('%4d', $exts_tested) . '
3081+
Exts skipped : ' . sprintf('%4d', count($exts_skipped)) . ' (' . implode(', ', $exts_skipped) . ')
3082+
Exts tested : ' . sprintf('%4d', count($exts_tested)) . '
30833083
---------------------------------------------------------------------
30843084
';
30853085
}

0 commit comments

Comments
 (0)