Module: tools Branch: master Commit: d8fe21ff6193f10894bf05a1ab757c7432162efa URL: https://gitlab.winehq.org/winehq/tools/-/commit/d8fe21ff6193f10894bf05a1ab75...
Author: Alexandre Julliard julliard@winehq.org Date: Wed Sep 7 16:09:03 2022 +0200
winetest: Add parsing of the new flaky test lines.
They are simply reported as failures for now.
---
winetest/build-index | 2 +- winetest/dissect | 15 +++++++++++++-- winetest/report.css | 1 + 3 files changed, 15 insertions(+), 3 deletions(-)
diff --git a/winetest/build-index b/winetest/build-index index 9a244630..14f1ffa7 100755 --- a/winetest/build-index +++ b/winetest/build-index @@ -323,7 +323,7 @@ EOF print OUT " <td class="note"></td>\n"; } } - print OUT " <td class="links"><a href="$gitlab/commit/$build->{name}">history</a>"; + print OUT " <td class="links"><a href="$gitlab/commits/$build->{name}">history</a>"; print OUT "</td></tr>\n"; } print OUT "</table></body></html>\n"; diff --git a/winetest/dissect b/winetest/dissect index 97bdc8da..fe8039dd 100755 --- a/winetest/dissect +++ b/winetest/dissect @@ -707,6 +707,17 @@ while ($line = <IN>) { check_unit($l_unit, "failure"); $failures++; } + elsif (($unit ne "" and + $line =~ /^(.*?)($units_re).c:(\d+)(:[0-9.]* Test (?:marked flaky|succeeded inside flaky todo block): .*)$/) or + $line =~ /^()([_a-z0-9]+).c:(\d+)(:[0-9.]* Test (?:marked flaky|succeeded inside flaky todo block): .*)$/) + { + my ($pollution, $l_unit, $l_num, $l_text) = ($1, $2, $3, $4); + add_test_line("flaky", escapeHTML($pollution) . + get_source_link($l_unit, $l_num) . + escapeHTML($l_text)); + check_unit($l_unit, "flaky"); + $failures++; + } elsif (($unit ne "" and $line =~ /^(.*?)($units_re).c:(\d+)(:[0-9.]* Test marked todo: .*)$/) or $line =~ /^()([_a-z0-9]+).c:(\d+)(:[0-9.]* Test marked todo: .*)$/) @@ -802,9 +813,9 @@ while ($line = <IN>) { get_source_link($l_unit, $l_num) . escapeHTML($l_text)); } - elsif ($line =~ /([0-9a-f]{4}):([_a-z0-9]+):[0-9.]* (\d+) tests? executed ((\d+) marked as todo, (\d+) failures?), (\d+) skipped./) + elsif ($line =~ /([0-9a-f]{4}):([_a-z0-9]+):[0-9.]* (\d+) tests? executed ((\d+) marked as todo, (?:(\d+) as flaky, )?(\d+) failures?), (\d+) skipped./) { - my ($l_pid, $l_unit, $l_total, $l_todo, $l_failures, $l_skipped) = ($1, $2, $3, $4, $5, $6); + my ($l_pid, $l_unit, $l_total, $l_todo, $l_flaky, $l_failures, $l_skipped) = ($1, $2, $3, $4, $5, $6, $7);
my $class = $l_failures ? "failed" : $l_todo ? "todo" : "result"; if ($l_unit eq $unit) diff --git a/winetest/report.css b/winetest/report.css index 4b2d126a..9e98618d 100644 --- a/winetest/report.css +++ b/winetest/report.css @@ -55,6 +55,7 @@ div.end { .result { color: green; } .skipped { color: blue; } .failed { color: red; } +.flaky { color: purple; } .todo { color: #d08000; } .trace { color: black; }