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@codeweavers.com --- testbot/bin/UpdateTaskLogs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/testbot/bin/UpdateTaskLogs b/testbot/bin/UpdateTaskLogs index 94adf422db..e50e449c0e 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;