If a test unit had a failure it will appear in the global failure patterns page. So add a link.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- This depends on both 1/3 and 2/3. See instructions in patch 2/3. --- winetest/dissect | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/winetest/dissect b/winetest/dissect index a3250ed1c..f8089466b 100755 --- a/winetest/dissect +++ b/winetest/dissect @@ -625,6 +625,7 @@ sub close_test_unit($) $failures += $extra_failures; $summary = "$s_total $todo $failures $skipped" if (!defined $summary); print SUM "- $dll $unit $summary $source\n"; + $testbox->{pattern} = "$dll:$unit" if ($failures); if ($failures && ++$failed_units > $maxfailedtests) { mydie "too many failed test units (>$maxfailedtests at $dll:$unit)"; } @@ -980,6 +981,10 @@ for (my $i = 0; $i <= $#boxes; $i++) { printf REPORT "<div id="%s" class="%s">\n", $boxes[$i]->{id}, $boxes[$i]->{class}; printf REPORT "<div class="updownbar">%s<div class='ralign'>", $boxes[$i]->{title}; + if ($boxes[$i]->{pattern}) + { + printf REPORT "<a href="/data/patterns.html#%s">pattern</a> | ", $boxes[$i]->{pattern}; + } if ($boxes[$i]->{testname}) { printf REPORT "<a href='/data/tests/%s.html'>all results</a> | ", $boxes[$i]->{testname}; @@ -1010,12 +1015,16 @@ for (my $i = 0; $i <= $#boxes; $i++) print FILE "<a href="..">summary</a> | <a href="../..">index</a></div>\n";
printf FILE "<div id="%s" class="%s">\n", $boxes[$i]->{id}, $boxes[$i]->{class}; - printf FILE "<div class="updownbar">%s", $boxes[$i]->{title}; + printf FILE "<div class="updownbar">%s<div class='ralign'>", $boxes[$i]->{title}; + if ($boxes[$i]->{pattern}) + { + printf FILE "<a href="/data/patterns.html#%s">pattern</a> | ", $boxes[$i]->{pattern}; + } if ($boxes[$i]->{testname}) { - printf FILE "<div class='ralign'><a href='/data/tests/%s.html'>all results</a></div>", $boxes[$i]->{testname}; + printf FILE "<a href='/data/tests/%s.html'>all results</a>", $boxes[$i]->{testname}; } - print FILE "</div>\n"; + print FILE "</div></div>\n"; print FILE $boxes[$i]->{data}, "</div>\n"; print FILE end_html(); close FILE or mydie "error writing to '$tmpdir/$boxes[$i]->{id}.html': $!";