Francois Gouget : testbot/Engine: Don't rename the old logs on Engine startup.

Alexandre Julliard julliard at winehq.org
Wed Jan 15 15:04:12 CST 2020


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Wed Jan 15 12:52:36 2020 +0100

testbot/Engine: Don't rename the old logs on Engine startup.

All the logs have been renamed by now.

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

---

 testbot/bin/Engine.pl               | 14 ------------
 testbot/lib/WineTestBot/LogUtils.pm | 44 -------------------------------------
 2 files changed, 58 deletions(-)

diff --git a/testbot/bin/Engine.pl b/testbot/bin/Engine.pl
index aed0e51..49347b5 100755
--- a/testbot/bin/Engine.pl
+++ b/testbot/bin/Engine.pl
@@ -103,20 +103,6 @@ sub Cleanup($;$$)
 {
   my ($Starting, $KillTasks, $KillVMs) = @_;
 
-  # FIXME Temporary: Rename the old logs so they follow the new naming scheme
-  #       and can be identified by WineSendLog.pl and JobDetails.pl.
-  RenameReferenceLogs();
-  foreach my $Job (@{CreateJobs()->GetItems()})
-  {
-    foreach my $Step (@{$Job->Steps->GetItems()})
-    {
-      foreach my $Task (@{$Step->Tasks->GetItems()})
-      {
-        RenameTaskLogs($Task->GetDir());
-      }
-    }
-  }
-
   # Verify that the running tasks are still alive and requeue them if not.
   # Ignore the Job and Step status fields because they may be a bit out of date.
   my %RunningVMs;
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index 3124e89..e1a8176 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -29,7 +29,6 @@ WineTestBot::LogUtils - Provides functions to parse task logs
 use Exporter 'import';
 our @EXPORT = qw(GetLogFileNames GetLogLabel GetLogErrors TagNewErrors
                  GetLogLineCategory GetReportLineCategory
-                 RenameReferenceLogs RenameTaskLogs
                  ParseTaskLog ParseWineTestReport);
 
 use Algorithm::Diff;
@@ -567,49 +566,6 @@ sub GetReportLineCategory($)
 # Log querying and formatting
 #
 
-sub RenameReferenceLogs()
-{
-  if (opendir(my $dh, "$DataDir/latest"))
-  {
-    # We will be renaming files so read the directory in one go
-    my @Entries = readdir($dh);
-    close($dh);
-    foreach my $Entry (@Entries)
-    {
-      if ($Entry =~ /^([a-z0-9._]+)$/)
-      {
-        my $NewName = $Entry = $1;
-        $NewName =~ s/\.log$/.report/;
-        $NewName =~ s/(_[a-z0-9]+)\.err$/$1.report.err/;
-        $NewName =~ s/_(32|64)\.report/_exe$1.report/;
-        if ($Entry ne $NewName and !-f "$DataDir/latest/$NewName")
-        {
-          rename "$DataDir/latest/$Entry", "$DataDir/latest/$NewName";
-        }
-      }
-    }
-  }
-}
-
-sub RenameTaskLogs($)
-{
-  my ($Dir) = @_;
-
-  if (-f "$Dir/err" and !-f "$Dir/log.err")
-  {
-    rename "$Dir/err", "$Dir/log.err";
-  }
-
-  if (-f "$Dir/log.old" and !-f "$Dir/old_log")
-  {
-    rename "$Dir/log.old", "$Dir/old_log";
-  }
-  if (-f "$Dir/err.old" and !-f "$Dir/old_log.err")
-  {
-    rename "$Dir/err.old", "$Dir/old_log.err";
-  }
-}
-
 =pod
 =over 12
 




More information about the wine-cvs mailing list