Module: tools Branch: master Commit: f8b184aac20305cab757b7b4682e2b39c4867761 URL: https://source.winehq.org/git/tools.git/?a=commit;h=f8b184aac20305cab757b7b4...
Author: Francois Gouget fgouget@codeweavers.com Date: Wed Jan 29 04:01:47 2020 +0100
testbot/UpdateTaskLogs: Delete reference reports that are not supposed to exist.
WineRunBuild used to take a snapshot of the reference logs for all the other tasks even if the build failed. Thus there could be reference logs even when the matching log does not exist. This patch ensures that 'UpdateTaskLogs --delete' still finds and deletes those.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
testbot/bin/UpdateTaskLogs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/testbot/bin/UpdateTaskLogs b/testbot/bin/UpdateTaskLogs index 5f858de..93b6504 100755 --- a/testbot/bin/UpdateTaskLogs +++ b/testbot/bin/UpdateTaskLogs @@ -256,11 +256,16 @@ sub ProcessTaskLogs($$$)
if (($OptDelete or $OptRebuild) and !$CollectOnly) { - # Save / delete the task's reference reports - foreach my $ReportName (@{GetLogFileNames($TaskDir)}) + # Save / delete the task's reference reports... all of them, + # even if they were not supposed to exist (e.g. failed builds). + my ($ErrMessage, $ReportNames, $_TaskMissions) = $Task->GetReportNames(); + if ($ErrMessage) + { + Error "$ErrMessage\n"; + $Rc = 1; + } + foreach my $ReportName (@$ReportNames) { - next if ($ReportName !~ /.report$/); - my $RefReportName = $Task->GetRefReportName($ReportName); my $RefReportPath = "$StepDir/$RefReportName";