Module: tools
Branch: master
Commit: 0de021aa9a4c1144d66345443330391553d97953
URL: https://gitlab.winehq.org/winehq/tools/-/commit/0de021aa9a4c1144d6634544333…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Fri Nov 25 02:41:54 2022 +0100
testbot/WineRun*: Downgrade an error to an information message.
When a task fails to run (e.g. because of a network error) the message
indicating it had to be restarted should not be marked as an error as
that would imply the patch is responsible for it when it is most likely
not. Similarly it should not be a warning ascribed to the patch.
So marking this as an information message makes the most sense. Also
note that the fact the task had to be restarted will be visible on the
job details page by the presence of the 'old testbot logs' link.
---
testbot/bin/WineRunBuild.pl | 8 +++++++-
testbot/bin/WineRunReconfig.pl | 8 +++++++-
testbot/bin/WineRunTask.pl | 8 +++++++-
testbot/bin/WineRunWineTest.pl | 8 +++++++-
testbot/lib/WineTestBot/LogUtils.pm | 3 ++-
5 files changed, 30 insertions(+), 5 deletions(-)
diff --git a/testbot/bin/WineRunBuild.pl b/testbot/bin/WineRunBuild.pl
index eb4b2c7d..64fe45ec 100755
--- a/testbot/bin/WineRunBuild.pl
+++ b/testbot/bin/WineRunBuild.pl
@@ -175,6 +175,12 @@ LogMsg "Task $JobId/$StepNo/$TaskNo started on ", $VM->Name, "\n";
# Error handling helpers
#
+sub LogTaskInfo($)
+{
+ my ($ErrMessage) = @_;
+ print STDERR "$Name0:info: ", $ErrMessage;
+}
+
sub LogTaskError($)
{
my ($ErrMessage) = @_;
@@ -208,7 +214,7 @@ sub WrapUpAndExit($;$$$$$$$)
}
elsif ($Tries >= 1)
{
- LogTaskError("The previous $Tries run(s) terminated abnormally\n");
+ LogTaskInfo("The previous $Tries run(s) terminated abnormally\n");
}
# Record result details that may be lost or overwritten by a later run
diff --git a/testbot/bin/WineRunReconfig.pl b/testbot/bin/WineRunReconfig.pl
index dc9f759b..5d58411b 100755
--- a/testbot/bin/WineRunReconfig.pl
+++ b/testbot/bin/WineRunReconfig.pl
@@ -176,6 +176,12 @@ LogMsg "Task $JobId/$StepNo/$TaskNo started\n";
# Error handling helpers
#
+sub LogTaskInfo($)
+{
+ my ($ErrMessage) = @_;
+ print STDERR "$Name0:info: ", $ErrMessage;
+}
+
sub LogTaskError($)
{
my ($ErrMessage) = @_;
@@ -210,7 +216,7 @@ sub WrapUpAndExit($;$$$$$$$)
}
elsif ($Tries >= 1)
{
- LogTaskError("The previous $Tries run(s) terminated abnormally\n");
+ LogTaskInfo("The previous $Tries run(s) terminated abnormally\n");
}
# Record result details that may be lost or overwritten by a later run
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index bce67cf2..3b514fb1 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -204,6 +204,12 @@ LogMsg "Task $JobId/$StepNo/$TaskNo started on ", $VM->Name, "\n";
# Error handling helpers
#
+sub LogTaskInfo($)
+{
+ my ($ErrMessage) = @_;
+ print STDERR "$Name0:info: ", $ErrMessage;
+}
+
sub LogTaskError($)
{
my ($ErrMessage) = @_;
@@ -242,7 +248,7 @@ sub WrapUpAndExit($;$$$$$$$$)
}
elsif ($Tries >= 1)
{
- LogTaskError("The previous $Tries run(s) terminated abnormally\n");
+ LogTaskInfo("The previous $Tries run(s) terminated abnormally\n");
}
# Record result details that may be lost or overwritten by a later run
diff --git a/testbot/bin/WineRunWineTest.pl b/testbot/bin/WineRunWineTest.pl
index dd578e47..ad869a96 100755
--- a/testbot/bin/WineRunWineTest.pl
+++ b/testbot/bin/WineRunWineTest.pl
@@ -201,6 +201,12 @@ LogMsg "Task $JobId/$StepNo/$TaskNo started on ", $VM->Name, "\n";
# Error handling helpers
#
+sub LogTaskInfo($)
+{
+ my ($ErrMessage) = @_;
+ print STDERR "$Name0:info: ", $ErrMessage;
+}
+
sub LogTaskError($)
{
my ($ErrMessage) = @_;
@@ -239,7 +245,7 @@ sub WrapUpAndExit($;$$$$$$$$)
}
elsif ($Tries >= 1)
{
- LogTaskError("The previous $Tries run(s) terminated abnormally\n");
+ LogTaskInfo("The previous $Tries run(s) terminated abnormally\n");
}
# Record result details that may be lost or overwritten by a later run
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index 3aa59391..07b4dcf5 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -91,7 +91,8 @@ sub GetLogLineCategory($)
$Line =~ /^Running (?:the tests|WineTest) / or
$Line =~ /^Task: (?:ok|tests|Updated)/ or
# testbot.log information messages
- $Line =~ /^----- Run /)
+ $Line =~ /^----- Run / or
+ $Line =~ /:info:/)
{
return "info";
}