Skip to content

Commit b20ff2f

Browse files
committed
Merge branch 'PHP-8.2'
* PHP-8.2: Make unrepeatable tests retriable
2 parents d1a38e8 + d5f7ffb commit b20ff2f

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

run-tests.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1854,7 +1854,6 @@ function run_test(string $php, $file, array $env): string
18541854
$orig_php = $php;
18551855
$php = escapeshellarg($php);
18561856

1857-
$retriable = true;
18581857
$retried = false;
18591858
retry:
18601859

@@ -1897,7 +1896,6 @@ function run_test(string $php, $file, array $env): string
18971896
$tested = $test->getName();
18981897

18991898
if ($test->hasSection('FILE_EXTERNAL')) {
1900-
$retriable = false;
19011899
if ($num_repeats > 1) {
19021900
return skip_test($tested, $tested_file, $shortname, 'Test with FILE_EXTERNAL might not be repeatable');
19031901
}
@@ -1926,7 +1924,6 @@ function run_test(string $php, $file, array $env): string
19261924
}
19271925
$php = escapeshellarg($php_cgi) . ' -C ';
19281926
$uses_cgi = true;
1929-
$retriable = false;
19301927
if ($num_repeats > 1) {
19311928
return skip_test($tested, $tested_file, $shortname, 'CGI does not support --repeat');
19321929
}
@@ -1944,15 +1941,13 @@ function run_test(string $php, $file, array $env): string
19441941
} else {
19451942
return skip_test($tested, $tested_file, $shortname, 'phpdbg not available');
19461943
}
1947-
$retriable = false;
19481944
if ($num_repeats > 1) {
19491945
return skip_test($tested, $tested_file, $shortname, 'phpdbg does not support --repeat');
19501946
}
19511947
}
19521948

19531949
foreach (['CLEAN', 'STDIN', 'CAPTURE_STDIO'] as $section) {
19541950
if ($test->hasSection($section)) {
1955-
$retriable = false;
19561951
if ($num_repeats > 1) {
19571952
return skip_test($tested, $tested_file, $shortname, "Test with $section might not be repeatable");
19581953
}
@@ -2148,7 +2143,6 @@ function run_test(string $php, $file, array $env): string
21482143
settings2array(preg_split("/[\n\r]+/", $ini), $ini_settings);
21492144

21502145
if (isset($ini_settings['opcache.opt_debug_level'])) {
2151-
$retriable = false;
21522146
if ($num_repeats > 1) {
21532147
return skip_test($tested, $tested_file, $shortname, 'opt_debug_level tests are not repeatable');
21542148
}
@@ -2653,7 +2647,7 @@ function run_test(string $php, $file, array $env): string
26532647

26542648
$wanted_re = null;
26552649
}
2656-
if (!$passed && !$retried && $retriable && error_may_be_retried($test, $output)) {
2650+
if (!$passed && !$retried && error_may_be_retried($test, $output)) {
26572651
$retried = true;
26582652
goto retry;
26592653
}

0 commit comments

Comments
 (0)