Signed-off-by: Francois Gouget fgouget@codeweavers.com --- An alternative would be to key this off of the id and 'testfile' class. But it feels cleaner to have a separate property for this.
Also I opted to right-align the new link to no clutter the source filename. So on the left is the box title and on the right are all the links (all results and up / down arrows). --- winetest/dissect | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/winetest/dissect b/winetest/dissect index 7e28eacca..a3250ed1c 100755 --- a/winetest/dissect +++ b/winetest/dissect @@ -562,7 +562,9 @@ sub create_test_unit_box() { $dllinfo{$dll}->{first} = "$dll:$unit"; } - return create_box("$dll:$unit", "testfile", get_source_link(undef, undef)); + my $box = create_box("$dll:$unit", "testfile", get_source_link(undef, undef)); + $box->{testname} = "$dll:$unit"; + return $box; }
sub close_test_unit($) @@ -978,6 +980,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]->{testname}) + { + printf REPORT "<a href='/data/tests/%s.html'>all results</a> | ", $boxes[$i]->{testname}; + } printf REPORT "<a href="#%s">↑</a>", $boxes[$i]->{prev} if defined $boxes[$i]->{prev}; printf REPORT "<a href="#%s">↓</a>", $boxes[$i]->{next} if defined $boxes[$i]->{next}; print REPORT "</div></div>\n"; @@ -1004,7 +1010,12 @@ 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</div>\n", $boxes[$i]->{title}; + printf FILE "<div class="updownbar">%s", $boxes[$i]->{title}; + if ($boxes[$i]->{testname}) + { + printf FILE "<div class='ralign'><a href='/data/tests/%s.html'>all results</a></div>", $boxes[$i]->{testname}; + } + print FILE "</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': $!";