Francois Gouget : winetest/build-index: Link the test unit pages to the failure patterns.

Alexandre Julliard julliard at winehq.org
Wed Apr 28 16:06:59 CDT 2021


Module: tools
Branch: master
Commit: 940756efbf128034638e41e4b14e1842ab0c6012
URL:    https://source.winehq.org/git/tools.git/?a=commit;h=940756efbf128034638e41e4b14e1842ab0c6012

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Apr 28 11:20:45 2021 +0200

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

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>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 winetest/build-index | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/winetest/build-index b/winetest/build-index
index 7eacb87..6a3356a 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>




More information about the wine-cvs mailing list