Francois Gouget : testbot/WineRunTask: Rename the Windows test reports.

Alexandre Julliard julliard at winehq.org
Fri Jun 22 05:44:25 CDT 2018


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

Author: Francois Gouget <fgouget at codeweavers.com>
Date:   Thu Jun 21 14:35:29 2018 +0200

testbot/WineRunTask: Rename the Windows test reports.

Keep 'log' for the task log messages (such as the compilation log) and
store the actual (WineTest) test report in '.report' files.

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

---

 testbot/bin/WineRunTask.pl | 16 ++++++++--------
 testbot/web/JobDetails.pl  |  9 ++++++---
 2 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index 7f92b88..3f5a3ee 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -195,7 +195,7 @@ my $OldUMask = umask(002);
 my $TaskDir = $Task->CreateDir();
 umask($OldUMask);
 my $VM = $Task->VM;
-my $RptFileName = $VM->Name . ".rpt";
+my $RptFileName = $Step->FileType .".report";
 
 
 my $Start = Time();
@@ -292,13 +292,13 @@ sub WrapUpAndExit($;$$$)
   if ($Step->Type eq 'suite' and $Status eq 'completed' and !$TimedOut)
   {
     # Keep the old report if the new one is missing
-    if (-f "$TaskDir/log" and !-z "$TaskDir/log")
+    if (-f "$TaskDir/$RptFileName" and !-z "$TaskDir/$RptFileName")
     {
       # Update the reference VM suite results for WineSendLog.pl
       my $LatestBaseName = join("", "$DataDir/latest/", $Task->VM->Name, "_",
                                 $Step->FileType eq "exe64" ? "64" : "32");
       unlink("$LatestBaseName.log");
-      link("$TaskDir/log", "$LatestBaseName.log");
+      link("$TaskDir/$RptFileName", "$LatestBaseName.log");
       unlink("$LatestBaseName.err");
       if (-f "$TaskDir/err" and !-z "$TaskDir/err")
       {
@@ -518,11 +518,11 @@ if (!defined $TA->Wait($Pid, $Timeout, $Keepalive))
 }
 
 my $TimedOut;
-Debug(Elapsed($Start), " Retrieving the report file to 'log'\n");
-if ($TA->GetFile($RptFileName, "$TaskDir/log"))
+Debug(Elapsed($Start), " Retrieving the report file to '$RptFileName'\n");
+if ($TA->GetFile($RptFileName, "$TaskDir/$RptFileName"))
 {
-  chmod 0664, "$TaskDir/log";
-  if (open(my $LogFile, "<", "$TaskDir/log"))
+  chmod 0664, "$TaskDir/$RptFileName";
+  if (open(my $LogFile, "<", "$TaskDir/$RptFileName"))
   {
     # There is more than one test unit when running the full test suite so keep
     # track of the current one. Note that for the TestBot we don't count or
@@ -788,7 +788,7 @@ if ($TA->GetFile($RptFileName, "$TaskDir/log"))
   else
   {
     $NewStatus = 'boterror';
-    Error "Unable to open 'log' for reading: $!\n";
+    Error "Unable to open '$RptFileName' for reading: $!\n";
     LogTaskError("Unable to open the log file for reading: $!\n");
   }
 }
diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl
index 410d186..f05c0f6 100644
--- a/testbot/web/JobDetails.pl
+++ b/testbot/web/JobDetails.pl
@@ -283,9 +283,12 @@ sub GetHtmlLine($$$)
   return (undef, $Line);
 }
 
+my @MILogFiles = qw(exe32.report exe64.report log log.old);
 my %MILogLabels = (
-  "log" => "task log",
-  "log.old" => "old logs",
+  "exe32.report" => "32 bit Windows report",
+  "exe64.report" => "64 bit Windows report",
+  "log"          => "task log",
+  "log.old"      => "old logs",
 );
 
 sub InitMoreInfo($)
@@ -301,7 +304,7 @@ sub InitMoreInfo($)
 
     my $Value = $self->GetParam("f$Key");
     my $TaskDir = $StepTask->GetTaskDir();
-    foreach my $Log ("log", "log.old")
+    foreach my $Log (@MILogFiles)
     {
       if (!-f "$TaskDir/$Log" or -z "$TaskDir/$Log")
       {




More information about the wine-cvs mailing list