1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Merge branch 'PHP-8.1' into PHP-8.2

* PHP-8.1:
  Implement flaky test section
This commit is contained in:
Ilija Tovilo
2023-07-06 09:46:03 +02:00
2 changed files with 6 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
--TEST--
Test hrtime() aligns with microtime()
--XFAIL--
--FLAKY--
This test frequently fails in CI
--FILE--
<?php

View File

@@ -2626,7 +2626,7 @@ COMMAND $cmd
$wanted_re = null;
}
if (!$passed && !$retried && $retriable && error_may_be_retried($output)) {
if (!$passed && !$retried && $retriable && error_may_be_retried($test, $output)) {
$retried = true;
goto retry;
}
@@ -2806,9 +2806,10 @@ SH;
return $restype[0] . 'ED';
}
function error_may_be_retried(string $output): bool
function error_may_be_retried(TestFile $test, string $output): bool
{
return preg_match('((timed out)|(connection refused)|(404: page not found)|(address already in use)|(mailbox already exists))i', $output) === 1;
return preg_match('((timed out)|(connection refused)|(404: page not found)|(address already in use)|(mailbox already exists))i', $output) === 1
|| $test->hasSection('FLAKY');
}
/**
@@ -3798,6 +3799,7 @@ class TestFile
'INI', 'ENV', 'EXTENSIONS',
'SKIPIF', 'XFAIL', 'XLEAK', 'CLEAN',
'CREDITS', 'DESCRIPTION', 'CONFLICTS', 'WHITESPACE_SENSITIVE',
'FLAKY',
];
/**