Skip to content

Commit 27d32e6

Browse files
committed
wip
1 parent bdff92a commit 27d32e6

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

run-tests.php

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ function main(): void
160160
$optionals, $pass_option_n, $pass_options,
161161
$pattern_match, $php, $php_cgi, $phpdbg, $preload, $redir_tests,
162162
$repeat, $result_tests_file, $slow_min_ms, $start_time, $switch,
163-
$temp_source, $temp_target, $test_cnt, $test_dirs,
163+
$limit_skipped_exts, $temp_source, $temp_target, $test_cnt, $test_dirs,
164164
$test_files, $test_idx, $test_list, $test_results, $testfile,
165165
$user_tests, $valgrind, $sum_results, $shuffle, $file_cache, $num_repeats,
166166
$bless, $show_progress;
@@ -656,14 +656,6 @@ function main(): void
656656
}
657657
}
658658

659-
if ($limit_skipped_exts !== false) {
660-
$exts_skipped_diff = array_diff($exts_skipped, $limit_skipped_exts);
661-
if (count($exts_skipped_diff) > 0) {
662-
echo 'The following extensions are not allowed to be skipped: ' . implode(', ', $exts_skipped_diff) . "\n";
663-
exit(1);
664-
}
665-
}
666-
667659
if ($selected_tests && count($test_files) === 0) {
668660
echo "No tests found.\n";
669661
return;
@@ -1273,11 +1265,20 @@ function system_with_timeout(
12731265
*/
12741266
function run_all_tests(array $test_files, array $env, $redir_tested = null): void
12751267
{
1276-
global $test_results, $failed_tests_file, $result_tests_file, $php, $test_idx, $file_cache;
1268+
global $test_results, $failed_tests_file, $result_tests_file, $php, $test_idx, $file_cache,
1269+
$exts_skipped, $limit_skipped_exts;
12771270
global $preload;
12781271
// Parallel testing
12791272
global $PHP_FAILED_TESTS, $workers, $workerID, $workerSock;
12801273

1274+
if ($limit_skipped_exts !== false) {
1275+
$exts_skipped_diff = array_diff($exts_skipped, $limit_skipped_exts);
1276+
if (count($exts_skipped_diff) > 0) {
1277+
echo 'The following extensions are not allowed to be skipped: ' . implode(', ', $exts_skipped_diff) . "\n";
1278+
exit(1);
1279+
}
1280+
}
1281+
12811282
if ($file_cache !== null || $preload) {
12821283
/* Automatically skip opcache tests in --file-cache and --preload mode,
12831284
* because opcache generally expects these to run under a default configuration. */

0 commit comments

Comments
 (0)