[tools] winetest/build-index: Link the test unit pages to the failure patterns.

Francois Gouget fgouget at codeweavers.com
Wed Apr 28 04:20:45 CDT 2021


Only for the test units that have failures in any of the buids /
platforms since there is no pattern in case of success.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
The test pages will automatically be updated when the next report 
arrives.
---
 winetest/build-index | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/winetest/build-index b/winetest/build-index
index 7eacb87f9..6a3356a25 100755
--- a/winetest/build-index
+++ b/winetest/build-index
@@ -259,6 +259,7 @@ foreach my $build (@too_old)
 #
 
 my %alltests = ();
+my %haspattern = ();
 
 foreach my $build (@builds)
 {
@@ -268,6 +269,10 @@ foreach my $build (@builds)
         chomp;
         my ($test, $group, $cell) = split / +/, $_, 3;
         $alltests{$test}->{$build->{name}}->{$group} = $cell;
+        if (!$haspattern{$test} and $cell =~ /result (?:fail|mixed)/)
+        {
+            $haspattern{$test} = 1;
+        }
     }
     close SUM;
 }
@@ -294,6 +299,8 @@ foreach my $test (keys %alltests)
 {
     my $filename = "data/tests/$test.html";
     open OUT, ">", "$filename.new" or die "could not open '$filename.new' for writing: $!";
+
+    my $title_link = $haspattern{$test} ? " | <a href=\"/data/patterns.html#$test\">failure patterns</a>" : "";
     print OUT <<EOF;
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
                       "http://www.w3.org/TR/html4/strict.dtd">
@@ -312,7 +319,7 @@ EOF
  | <a href="..">index</a>
 </div>
 <div class="main">
-<h2>$test test runs</h2>
+<h2>$test test runs$title_link</h2>
 <table class="report">
 <thead>
   <tr><th class="test">Build</th><th class="test">Date</th>
-- 
2.20.1



More information about the wine-devel mailing list