Signed-off-by: Francois Gouget fgouget@codeweavers.com --- winetest/build-patterns | 20 ++++++++++++-------- winetest/report.css | 4 ++++ 2 files changed, 16 insertions(+), 8 deletions(-)
diff --git a/winetest/build-patterns b/winetest/build-patterns index aa6a6e495..b6e5531e1 100755 --- a/winetest/build-patterns +++ b/winetest/build-patterns @@ -999,7 +999,7 @@ sub write_newmodes_line($$) foreach my $status (sort cmpstatus keys %{$test->{newmodes}}) { my ($symbol, $class, $title, $_link, $attrs) = get_status_html($status, $test->{colors}); - print $html " <span class='pat$class'$attrs title='$title'><b><i>$symbol</i></b></span>"; + print $html " <span class='pat$class newM'$attrs title='$title'>$symbol</span>"; } print $html "\n"; } @@ -1016,7 +1016,7 @@ sub write_pattern_line($$$) my ($range_start, $range_end, $range_title); foreach my $build (@sortedbuilds) { - my ($symbol, $class, $title); + my ($symbol, $class, $title, $is_new_mode); my ($tag, $attrs) = ("span", ""); my $status = $testreport->{status}->{$build->{name}};
@@ -1066,11 +1066,7 @@ sub write_pattern_line($$$) $attrs .= sprintf " href='%s/%s/%s.html#%s'", $build->{name}, $reportdir, $link, $dll; } - if ($test->{newmodes}->{$status}) - { - $symbol = "<b><i>$symbol</i></b>"; - $has_newmode = 1; - } + $is_new_mode = $test->{newmodes}->{$status}; }
if ($range_symbol eq $symbol) @@ -1091,7 +1087,15 @@ sub write_pattern_line($$$) }
# Start a new pattern range - $class = " class='pat$class'" if ($class); + if ($is_new_mode) + { + $class = $class ? " class='pat$class newM'" : " class='newM'"; + $has_newmode = 1; + } + elsif ($class) + { + $class = " class='pat$class'"; + } print $html "<$tag$class$attrs"; if ($tag eq "a") { diff --git a/winetest/report.css b/winetest/report.css index 25f156d6f..4b2d126ad 100644 --- a/winetest/report.css +++ b/winetest/report.css @@ -134,6 +134,10 @@ div.pattern :hover { color: black; text-decoration: underline; } .patV { /* test blocked by the anti-virus */ background-color: #99e6ff; } +.newM { /* new failure mode */ + font-style: italic; + font-weight: bold; +}
.commitR { color: #cc0000;
The failure count can help distinguish the failure counts when there are many different values. But this makes the patterns more noisy so only show them when hovering over the pattern. Also each build result only gets one character so this is only possible if the failure count is 9 or less.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- This could be cranked up to 15 (11 is for wimps) but the pattern looks cursed when hexed.
Also note that this depends on the previous patch. Otherwise '<b><i>2</i></b>' would get converted to '222222222222222'! --- winetest/build-patterns | 4 ++++ winetest/patterns.js | 21 +++++++++++++++++++++ 2 files changed, 25 insertions(+)
diff --git a/winetest/build-patterns b/winetest/build-patterns index b6e5531e1..7acb153d3 100755 --- a/winetest/build-patterns +++ b/winetest/build-patterns @@ -975,6 +975,10 @@ sub get_status_html($$)
return @{$status2html{$status}} if ($status2html{$status});
+ if ($status =~ /^[1-9]$/) + { + return ("F", "F", "$status failures", "t", " fcount='$status' style='background-color: $failcolors->{$status}'"); + } if ($status =~ /^[0-9]+$/) { return ("F", "F", "$status failures", "t", " style='background-color: $failcolors->{$status}'"); diff --git a/winetest/patterns.js b/winetest/patterns.js index 65e9cb82e..459190347 100644 --- a/winetest/patterns.js +++ b/winetest/patterns.js @@ -170,6 +170,24 @@ function toggledReportCB(e) refreshPage(changes); }
+function showRangeCounts(e) +{ + const domtest = e.target.closest("div.testfile"); + domtest.querySelectorAll(":scope [fcount]").forEach(frange => { + const fcount = frange.getAttribute("fcount"); + frange.innerHTML = fcount.repeat(frange.innerHTML.length); + }); +} + +function hideRangeCounts(e) +{ + const domtest = e.target.closest("div.testfile"); + domtest.querySelectorAll(":scope [fcount]").forEach(frange => { + const fcount = frange.getAttribute("fcount"); + frange.innerHTML = "F".repeat(frange.innerHTML.length); + }); +} + function init() { hide_reruns = false; /* reruns are shown by default */ @@ -225,6 +243,9 @@ function init() cb.patlines.push(patline); test.patlines.push(patline); if (cb.checked) test.linecount++; + const pattern = domline.querySelector("div.pattern"); + pattern.addEventListener('mouseenter', showRangeCounts); + pattern.addEventListener('mouseleave', hideRangeCounts); } }); if (test.linecount < test.patlines.length)
Hovering over the trailing space will show the low failure counts without also popping up a tooltip.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- winetest/build-patterns | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/winetest/build-patterns b/winetest/build-patterns index 7acb153d3..0bad35120 100755 --- a/winetest/build-patterns +++ b/winetest/build-patterns @@ -1122,7 +1122,7 @@ sub write_pattern_line($$$) $range_title, $range_symbol x $range_count; } my $newmode = $has_newmode ? " newmode" : ""; - print $html "</div> <span class='label$newmode'>$reportdir</span>\n</div>"; + print $html " </div><span class='label$newmode'>$reportdir</span>\n</div>"; }
sub index2symbol($)