Francois Gouget : testbot/UpdateTaskLogs: Fix the detection of Wine test reports.

Alexandre Julliard julliard at winehq.org
Wed Mar 11 17:37:12 CDT 2020


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Mar 11 09:53:32 2020 +0100

testbot/UpdateTaskLogs: Fix the detection of Wine test reports.

We know a report come from a Wine test if the job was created for a
patch. But the step that references the patch is not necessarily the
task's parent step: it could also be the build step.

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

---

 testbot/bin/UpdateTaskLogs | 14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

diff --git a/testbot/bin/UpdateTaskLogs b/testbot/bin/UpdateTaskLogs
index 94adf42..e50e449 100755
--- a/testbot/bin/UpdateTaskLogs
+++ b/testbot/bin/UpdateTaskLogs
@@ -286,9 +286,9 @@ sub MoveRefReport($$;$)
   return 0;
 }
 
-sub ProcessTaskLogs($$$)
+sub ProcessTaskLogs($$$$)
 {
-  my ($Step, $Task, $CollectOnly) = @_;
+  my ($Step, $Task, $IsWineTest, $CollectOnly) = @_;
 
   my $Rc = 0;
   my $ReportNames;
@@ -418,12 +418,11 @@ sub ProcessTaskLogs($$$)
   {
     # And (re)build the .errors files, even if Status != 'completed' for
     # task.log and testbot.log.
-    my ($IsWineTest, $TaskTimedOut);
+    my $TaskTimedOut;
     if ($Task->Started and $Task->Ended)
     {
       my $Duration = $Task->Ended - $Task->Started;
       $TaskTimedOut = $Duration > $Task->Timeout;
-      $IsWineTest = ($Step->Type eq "patch" or $Step->Type eq "suite");
     }
     foreach my $LogName (@{GetLogFileNames($TaskDir, "+old")})
     {
@@ -564,11 +563,14 @@ my $Jobs = CreateJobs();
 foreach my $Task (sort { ($a->Ended || 0) <=> ($b->Ended || 0) } @AllTasks)
 {
   my ($JobId, $StepNo, $TaskNo) = @{$Task->GetMasterKey()};
-  my $Step = $Jobs->GetItem($JobId)->Steps->GetItem($StepNo);
+  my $Steps = $Jobs->GetItem($JobId)->Steps;
+  my $Step = $Steps->GetItem($StepNo);
+  my $IsWineTest = $Step->FileType eq "patch" ||
+                   $Steps->GetItem(1)->FileType eq "patch";
   my $CollectOnly = ((defined $OptJobId and $OptJobId ne $JobId) or
                      (defined $OptStepNo and $OptStepNo ne $StepNo) or
                      (defined $OptTaskNo and $OptTaskNo ne $TaskNo));
-  $Rc += ProcessTaskLogs($Step, $Task, $CollectOnly);
+  $Rc += ProcessTaskLogs($Step, $Task, $IsWineTest, $CollectOnly);
 }
 
 exit $Rc ? 1 : 0;




More information about the wine-cvs mailing list