Francois Gouget : testbot/TestWTBS: Provide finer grained support for 32-/64-bit reports.

Alexandre Julliard julliard at winehq.org
Wed Jun 1 14:41:16 CDT 2022


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Jun  1 14:52:20 2022 +0200

testbot/TestWTBS: Provide finer grained support for 32-/64-bit reports.

This allows specifying different expected errors for 32-bit and 64-bit
report files. This is in particular needed when trying to match Wine
exception messages since they contain the bitness.

Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 testbot/tests/TestWTBS | 49 ++++++++++++++++++++++++++++++++++++++-----------
 1 file changed, 38 insertions(+), 11 deletions(-)

diff --git a/testbot/tests/TestWTBS b/testbot/tests/TestWTBS
index e5cd448..139f011 100755
--- a/testbot/tests/TestWTBS
+++ b/testbot/tests/TestWTBS
@@ -337,7 +337,7 @@ sub LoadTestInfo($)
   foreach my $RawGroupName (@{$RawInfo->{ErrGroupNames}})
   {
     my $GroupName = lcfirst($RawGroupName);
-    if ($GroupName =~ s/^(tasks|tests|build|win|win32|win64|wine|wine:build|wine:test|wine:module)\.(report|log|testbot)\.//)
+    if ($GroupName =~ s/^(tasks|tests|build|win|win32|win64|wine|wine:build|wine:test|wine:module)\.(win32|wow32|wow64|report|log|testbot)\.//)
     {
       my $ErrInfo = ($TestInfo->{$1}->{"$2.errors"} ||= {});
       push @{$ErrInfo->{ErrGroupNames}}, $GroupName;
@@ -381,8 +381,8 @@ sub LoadTestInfo($)
       if (ref($SrcVal) eq "HASH" and $Field !~ /\.errors$/)
       {
         # Simply propagating hashtable references would result in changes to
-        # win32 to impact the parent win / test parent which is not what we
-        # want. So subsets of properties are not supported.
+        # win32 to impact the win / test parent which is not what we want.
+        # So subsets of properties are not supported.
         # .errors properties are the exception because their values are a
         # LoadLogErrors() structure. As a result they are read-only, and are
         # not merged.
@@ -445,7 +445,7 @@ sub LoadTestInfo($)
     foreach my $TaskType ("tasks", "tests", "build", "win", "win32", "win64",
                           "wine", "wine:build", "wine:test", "wine:module")
     {
-      foreach my $LogType ("report", "log", "testbot")
+      foreach my $LogType ("win32", "wow32", "wow64", "report", "log", "testbot")
       {
         my $Array = $TestInfo->{$TaskType}->{"$LogType.$GrepType"};
         next if (!defined $Array);
@@ -483,6 +483,30 @@ sub LoadTestInfo($)
     SetDefault($TestInfo, "webpatch", "Status", $Status);
   }
 
+  # Propagate the 'report.*' settings to win32, wow32 and wow64
+  foreach my $TaskType ("wine", "wine:build", "wine:test", "wine:module")
+  {
+    my $TaskInfo = $TestInfo->{$TaskType};
+    foreach my $ReportField (keys %$TaskInfo)
+    {
+      next if (!$ReportField =~ /^report\./);
+      if (ref($TaskInfo->{$ReportField}) eq "HASH" and
+          $ReportField !~ /\.errors$/)
+      {
+        # See the previous task-type propagation comment.
+        fail("internal error: $TaskType.$ReportField should not be a hash in $FileName");
+        next;
+      }
+      foreach my $LogType ("win32", "wow32", "wow64")
+      {
+        my $LogField = $ReportField;
+        $LogField =~ s/^report/$LogType/;
+        next if (defined $TaskInfo->{$LogField});
+        $TaskInfo->{$LogField} = $TaskInfo->{$ReportField};
+      }
+    }
+  }
+
   return $TestInfo;
 }
 
@@ -643,13 +667,14 @@ sub IsTimeoutError($$)
 }
 
 =pod
-=item <tasks.(report|log|testbot).groupname>
+=item <tasks.(win32|wow32|wow64|report|log|testbot).groupname>
 
 Verifies the presence of new errors in the specified error log or report
 of the tasks in the specified category. For this, list the group and errors
 that are expected to appear; where the group name is prefixed by the task
-category and either 'report' for the test reports, 'log' for 'task.log', or
-'testbot' for 'testbot.log'.
+category and either 'win32' for 'win32.report', 'wow32' for 'wow32.report',
+'wow64' for 'wow64.report', 'report' for any of the test reports,
+'log' for 'task.log', or 'testbot' for 'testbot.log'.
 
 For instance:
 g 0 tests.report.kernel32
@@ -678,7 +703,7 @@ Finally, note that while the error directives are inherited by subcategories,
 they are not merged. So if both win and win32 have error-matching directives,
 win32 will not inherit anything from the win category.
 
-=item <tasks.(report|log|testbot).Errors>
+=item <tasks.(win32|wow32|wow64|report|log|testbot).Errors>
 
 Inheritance of the reference error lists cannot be prevented but can be ignored
 by setting this property to 'ignore'.
@@ -856,8 +881,8 @@ depend on whether the test was the last one run by the task (in the Wine case).
 By default this check is skipped and timeout errors are reported like any
 other unexpected error.
 
-=item <tasks.(report|log|testbot).Grep>
-=item <tasks.(report|log|testbot).GrepV>
+=item <tasks.(win32|wow32|wow64|report|log|testbot).Grep>
+=item <tasks.(win32|wow32|wow64|report|log|testbot).GrepV>
 
 Verifies the presence or absence of specific regular expressions in the
 specified error log or reports of the tasks in the specified category.
@@ -940,7 +965,9 @@ sub CheckTask($$$$)
     my $LogType = "log";
     if ($LogName =~ /\.report$/)
     {
-      $LogType = "report";
+      $LogType = $LogName =~ /^wow32/ ? "wow32" :
+                 $LogName =~ /^wow64/ ? "wow64" :
+                 "win32";
       $ReportCount++;
 
       ok($ReportTypes{$LogName}, "Check that $LogName is expected");




More information about the wine-cvs mailing list