Module: tools
Branch: master
Commit: 0c98cb701312c023ad73eff7d27fe1d998520fc4
URL: https://source.winehq.org/git/tools.git/?a=commit;h=0c98cb701312c023ad73eff…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Aug 23 10:48:29 2018 +0200
testbot: Improve the log naming scheme.
Tasks generate multiple types of logs and reports:
* 32 bit and / or 64 bit test reports(in *.report).
* A list of inconsistencies found in each test report (in err).
* A build or task log (in log).
* A list of task errors (in err).
* When a TestBot error occurs and a task gets restarted, the old task
logs are preserved in *.old files.
So far a task would generate either a single .report file or the log
file which is why the above scheme was sufficient. However this is
bound to change and there are additional constraints to accommodate:
* Running the tests on Wine will generate both a build log and a test
report.
* It may also be desirable to run both the 32 and 64 bit WoW Wine
tests in a single task which would result in it having both a
wow32.report and a wow64.report file in addition to the log one.
* If a task has two test reports the corresponding inconsistencies must
be easily identifiable and kept separate. This also means not mixing
them with the generic task errors.
* WineTest's reference logs are stored in 'vmname_*.log' files where the
variable part is computed differently for the Windows and Wine
reports.
So this patch tweaks the log and report naming scheme to avoid mixing
messages from different sources and to make it easier to match logs and
error files:
* For each log or report called 'xxx', any additional error message
will go to 'xxx.err'. This means any inconsistencies found in
'wow32.report' will go to 'wow32.report.err' and will not be mixed
with those of the 64 bit report.
* Old versions of a log, report or error file called 'xxx' will be
concatenated in 'old_xxx' (and the corresponding old errors would be
in 'old_xxx.err').
* The reference version of a report, log or error file called 'xxx' will
be stored in 'vmname_xxx'.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/Engine.pl | 15 +++++++++++
testbot/bin/Janitor.pl | 2 +-
testbot/bin/WineRunBuild.pl | 4 +--
testbot/bin/WineRunReconfig.pl | 4 +--
testbot/bin/WineRunTask.pl | 27 ++++++++++---------
testbot/bin/WineRunWineTest.pl | 32 +++++++++++++---------
testbot/bin/WineSendLog.pl | 22 +++++++--------
testbot/lib/WineTestBot/LogUtils.pm | 54 +++++++++++++++++++++++++++++++++----
testbot/lib/WineTestBot/Tasks.pm | 16 ++++++-----
testbot/web/JobDetails.pl | 4 +--
testbot/web/Munin.pl | 2 +-
11 files changed, 127 insertions(+), 55 deletions(-)
Diff: https://source.winehq.org/git/tools.git/?a=commitdiff;h=0c98cb701312c023ad7…
Module: tools
Branch: master
Commit: a8430bf9165051f41657634a925e9675482a22ae
URL: https://source.winehq.org/git/tools.git/?a=commit;h=a8430bf9165051f41657634…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Aug 23 10:46:29 2018 +0200
testbot: Remove support for the old task status lines.
Note that there is no need to wait for all task logs to be in the new
format because ParseTaskLog() is only called when a new task completes.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/WineRunBuild.pl | 2 +-
testbot/bin/WineRunReconfig.pl | 2 +-
testbot/bin/WineRunWineTest.pl | 2 +-
testbot/lib/WineTestBot/LogUtils.pm | 10 +++++-----
4 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/testbot/bin/WineRunBuild.pl b/testbot/bin/WineRunBuild.pl
index 2c5fbfa..b246164 100755
--- a/testbot/bin/WineRunBuild.pl
+++ b/testbot/bin/WineRunBuild.pl
@@ -406,7 +406,7 @@ if (!defined $TA->Wait($Pid, $Task->Timeout, 60))
Debug(Elapsed($Start), " Retrieving 'Build.log'\n");
if ($TA->GetFile("Build.log", "$TaskDir/log"))
{
- my $Result = ParseTaskLog("$TaskDir/log", "Build");
+ my $Result = ParseTaskLog("$TaskDir/log");
if ($Result eq "ok")
{
# We must have gotten the full log and the build did succeed.
diff --git a/testbot/bin/WineRunReconfig.pl b/testbot/bin/WineRunReconfig.pl
index 2301804..1e126b8 100755
--- a/testbot/bin/WineRunReconfig.pl
+++ b/testbot/bin/WineRunReconfig.pl
@@ -388,7 +388,7 @@ if (!defined $TA->Wait($Pid, $Task->Timeout, 60))
Debug(Elapsed($Start), " Retrieving 'Reconfig.log'\n");
if ($TA->GetFile("Reconfig.log", "$TaskDir/log"))
{
- my $Result = ParseTaskLog("$TaskDir/log", "Reconfig");
+ my $Result = ParseTaskLog("$TaskDir/log");
if ($Result eq "ok")
{
# We must have gotten the full log and the build did succeed.
diff --git a/testbot/bin/WineRunWineTest.pl b/testbot/bin/WineRunWineTest.pl
index 2168111..2552a7c 100755
--- a/testbot/bin/WineRunWineTest.pl
+++ b/testbot/bin/WineRunWineTest.pl
@@ -499,7 +499,7 @@ if (!defined $TA->Wait($Pid, $Task->Timeout, 60))
Debug(Elapsed($Start), " Retrieving 'Task.log'\n");
if ($TA->GetFile("Task.log", "$TaskDir/log"))
{
- my $Result = ParseTaskLog("$TaskDir/log", "Task");
+ my $Result = ParseTaskLog("$TaskDir/log");
if ($Result eq "ok")
{
# We must have gotten the full log and the build did succeed.
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index d39c81b..e05afb6 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -50,9 +50,9 @@ Returns ok if the task was successful and an error code otherwise.
=back
=cut
-sub ParseTaskLog($$)
+sub ParseTaskLog($)
{
- my ($FileName, $ResultPrefix) = @_;
+ my ($FileName) = @_;
if (open(my $LogFile, "<", $FileName))
{
@@ -60,16 +60,16 @@ sub ParseTaskLog($$)
foreach my $Line (<$LogFile>)
{
chomp $Line;
- if ($Line =~ /^(?:$ResultPrefix|Task): ok$/)
+ if ($Line =~ /^Task: ok$/)
{
$Result ||= "ok";
}
- elsif ($Line =~ /^(?:$ResultPrefix|Task): Patch failed to apply$/)
+ elsif ($Line =~ /^Task: Patch failed to apply$/)
{
$Result = "badpatch";
last; # Should be the last and most specific message
}
- elsif ($Line =~ /^(?:$ResultPrefix|Task): /)
+ elsif ($Line =~ /^Task: /)
{
$Result = "failed";
}