mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
wpt: Make WPT result formatting logic independent of ServoHandler
This will allow results to be formatted by other parts of the code (such as the intermittent filtering) code. Previously, formatting was handled in ServoHandler, which was a bit strange as it's really only necessary for GroupingFormatter and the intermittent filtering code. This also allows the results to be properly typed by the Python typing system.
This commit is contained in:
parent
69b272b4e1
commit
3543fd27f0
3 changed files with 134 additions and 111 deletions
|
@ -222,17 +222,17 @@ def filter_intermittents(
|
|||
actually_unexpected = []
|
||||
for i, result in enumerate(unexpected_results):
|
||||
print(f" [{i}/{len(unexpected_results)}]", file=sys.stderr, end="\r")
|
||||
if filter.is_failure_intermittent(result.test_name):
|
||||
if filter.is_failure_intermittent(result.path):
|
||||
intermittents.append(result)
|
||||
else:
|
||||
actually_unexpected.append(result)
|
||||
|
||||
output = "\n".join([
|
||||
f"{len(intermittents)} known-intermittent unexpected result",
|
||||
*[result.output.strip() for result in intermittents],
|
||||
*[str(result) for result in intermittents],
|
||||
"",
|
||||
f"{len(actually_unexpected)} unexpected results that are NOT known-intermittents",
|
||||
*[result.output.strip() for result in actually_unexpected],
|
||||
*[str(result) for result in actually_unexpected],
|
||||
])
|
||||
|
||||
if output_file:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue