The WineTest results usually don't change too much from one run to the next so it's better to have a slightly out of date report than nothing at all.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/bin/WineRunTask.pl | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl index c4ca578e2..ed190348b 100755 --- a/testbot/bin/WineRunTask.pl +++ b/testbot/bin/WineRunTask.pl @@ -291,13 +291,20 @@ sub WrapUpAndExit($;$$$)
if ($Status eq 'completed' and $Step->Type eq 'suite') { - # 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") if (-f "$TaskDir/log"); - unlink("$LatestBaseName.err"); - link("$TaskDir/err", "$LatestBaseName.err") if (-f "$TaskDir/err"); + # Keep the old report if the new one is missing + if (-f "$TaskDir/log" and !-z "$TaskDir/log") + { + # 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"); + unlink("$LatestBaseName.err"); + if (-f "$TaskDir/err" and !-z "$TaskDir/err") + { + link("$TaskDir/err", "$LatestBaseName.err"); + } + } }
my $Result = $VM->Name .": ". $VM->Status ." Status: $Status Failures: ". (defined $TestFailures ? $TestFailures : "unset");
If the task timed out the new report is likely quite incomplete and thus would be a poor substitute for the existing reference WineTest report.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/bin/WineRunTask.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl index ed190348b..7f92b8858 100755 --- a/testbot/bin/WineRunTask.pl +++ b/testbot/bin/WineRunTask.pl @@ -289,7 +289,7 @@ sub WrapUpAndExit($;$$$) $VM->Save(); }
- if ($Status eq 'completed' and $Step->Type eq 'suite') + 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")
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@codeweavers.com ---
A coming patch will put the output of the batch file in the log file (after I have checked that the TestBot VMs have the version of TestAgentd where redirections work correctly).
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 7f92b8858..3f5a3ee8d 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 3add52b4c..a1a846ff9 100644 --- a/testbot/web/JobDetails.pl +++ b/testbot/web/JobDetails.pl @@ -280,9 +280,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($) @@ -298,7 +301,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") {