Module: tools Branch: master Commit: cc2b971a9c02838154cf94171e539a846133faf7 URL: https://gitlab.winehq.org/winehq/tools/-/commit/cc2b971a9c02838154cf94171e53...
Author: Francois Gouget fgouget@codeweavers.com Date: Fri Oct 28 02:56:25 2022 +0200
testbot: Add Task fields to track warnings, failures and bad test units.
So far the tasks have a TestFailures field which tracks the number of failures for that task, but not whether any of them is new. This adds a field to keep track of the number of new failures and another pair to do the same for warnings. This further adds a field to track the numbder of failed test units. These fields can then be used in the web pages to indicate whether there are new failures / warnings, and how many test units have failed. But until there is support for setting these fields, they are hidden.
---
testbot/bin/Engine.pl | 4 ++++ testbot/ddl/update48.sql | 11 +++++++++++ testbot/ddl/winetestbot.sql | 4 ++++ testbot/lib/WineTestBot/Jobs.pm | 4 ++++ testbot/lib/WineTestBot/StepsTasks.pm | 8 ++++++++ testbot/lib/WineTestBot/Tasks.pm | 4 ++++ testbot/web/JobDetails.pl | 2 +- 7 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/testbot/bin/Engine.pl b/testbot/bin/Engine.pl index 39577d14..d51adcb4 100755 --- a/testbot/bin/Engine.pl +++ b/testbot/bin/Engine.pl @@ -147,7 +147,11 @@ sub Cleanup($;$$) $Task->Status("queued"); $Task->Started(undef); $Task->Ended(undef); + $Task->NewWarnings(undef); + $Task->Warnings(undef); + $Task->NewTestFailures(undef); $Task->TestFailures(undef); + $Task->FailedTestUnits(undef); $Task->Save(); $CallUpdateStatus = 1; } diff --git a/testbot/ddl/update48.sql b/testbot/ddl/update48.sql new file mode 100644 index 00000000..79b14d06 --- /dev/null +++ b/testbot/ddl/update48.sql @@ -0,0 +1,11 @@ +USE winetestbot; + +ALTER TABLE Tasks + ADD NewWarnings INT(6) NULL + AFTER Ended, + ADD Warnings INT(6) NULL + AFTER NewWarnings, + ADD NewTestFailures INT(6) NULL + AFTER Warnings, + ADD FailedTestUnits INT(6) NULL + AFTER TestFailures; diff --git a/testbot/ddl/winetestbot.sql b/testbot/ddl/winetestbot.sql index 0cf70484..3c4f32a0 100644 --- a/testbot/ddl/winetestbot.sql +++ b/testbot/ddl/winetestbot.sql @@ -158,7 +158,11 @@ CREATE TABLE Tasks CmdLineArg VARCHAR(256) NULL, Started DATETIME NULL, Ended DATETIME NULL, + NewWarnings INT(6) NULL, + Warnings INT(6) NULL, + NewTestFailures INT(6) NULL, TestFailures INT(6) NULL, + FailedTestUnits INT(6) NULL, PRIMARY KEY (JobId, StepNo, No), FOREIGN KEY(VMName) REFERENCES VMs(Name) ) diff --git a/testbot/lib/WineTestBot/Jobs.pm b/testbot/lib/WineTestBot/Jobs.pm index b54f864d..c5becbef 100644 --- a/testbot/lib/WineTestBot/Jobs.pm +++ b/testbot/lib/WineTestBot/Jobs.pm @@ -412,7 +412,11 @@ sub Restart($) $Task->Status("queued"); $Task->Started(undef); $Task->Ended(undef); + $Task->NewWarnings(undef); + $Task->Warnings(undef); + $Task->NewTestFailures(undef); $Task->TestFailures(undef); + $Task->FailedTestUnits(undef); } $Step->Status("queued"); $Step->RmTree(); diff --git a/testbot/lib/WineTestBot/StepsTasks.pm b/testbot/lib/WineTestBot/StepsTasks.pm index 87146b27..928d33a4 100644 --- a/testbot/lib/WineTestBot/StepsTasks.pm +++ b/testbot/lib/WineTestBot/StepsTasks.pm @@ -157,7 +157,11 @@ sub _initialize($$) $StepTask->CmdLineArg($Task->CmdLineArg); $StepTask->Started($Task->Started); $StepTask->Ended($Task->Ended); + $StepTask->NewWarnings($Task->NewWarnings); + $StepTask->Warnings($Task->Warnings); + $StepTask->NewTestFailures($Task->NewTestFailures); $StepTask->TestFailures($Task->TestFailures); + $StepTask->FailedTestUnits($Task->FailedTestUnits);
$self->{Items}{$StepTask->GetKey()} = $StepTask; } @@ -190,7 +194,11 @@ my @PropertyDescriptors = ( CreateBasicPropertyDescriptor("CmdLineArg", "Command line args", !1, !1, "A", 256), CreateBasicPropertyDescriptor("Started", "Started", !1, !1, "DT", 19), CreateBasicPropertyDescriptor("Ended", "Ended", !1, !1, "DT", 19), + CreateBasicPropertyDescriptor("NewWarnings", "New Warnings", !1, !1, "N", 6), + CreateBasicPropertyDescriptor("Warnings", "Warnings", !1, !1, "N", 6), + CreateBasicPropertyDescriptor("NewTestFailures", "New Failures", !1, !1, "N", 6), CreateBasicPropertyDescriptor("TestFailures", "Failures", !1, !1, "N", 6), + CreateBasicPropertyDescriptor("FailedTestUnits", "Bad Test Units", !1, !1, "N", 6), ); SetupItemrefColumns(@PropertyDescriptors);
diff --git a/testbot/lib/WineTestBot/Tasks.pm b/testbot/lib/WineTestBot/Tasks.pm index 5b87c782..b6332d2d 100644 --- a/testbot/lib/WineTestBot/Tasks.pm +++ b/testbot/lib/WineTestBot/Tasks.pm @@ -363,7 +363,11 @@ my @PropertyDescriptors = ( CreateBasicPropertyDescriptor("CmdLineArg", "Command line args", !1, !1, "A", 256), CreateBasicPropertyDescriptor("Started", "Started", !1, !1, "DT", 19), CreateBasicPropertyDescriptor("Ended", "Ended", !1, !1, "DT", 19), + CreateBasicPropertyDescriptor("NewWarnings", "New Warnings", !1, !1, "N", 6), + CreateBasicPropertyDescriptor("Warnings", "Warnings", !1, !1, "N", 6), + CreateBasicPropertyDescriptor("NewTestFailures", "New Failures", !1, !1, "N", 6), CreateBasicPropertyDescriptor("TestFailures", "Failures", !1, !1, "N", 6), + CreateBasicPropertyDescriptor("FailedTestUnits", "Bad Test Units", !1, !1, "N", 6), CreateDetailrefPropertyDescriptor("Failures", "Known failures", &CreateTaskFailures), ); SetupItemrefColumns(@PropertyDescriptors); diff --git a/testbot/web/JobDetails.pl b/testbot/web/JobDetails.pl index 0b42aea5..035cba8c 100644 --- a/testbot/web/JobDetails.pl +++ b/testbot/web/JobDetails.pl @@ -50,7 +50,7 @@ sub DisplayProperty($$) my ($self, $PropertyDescriptor) = @_;
my $PropertyName = $PropertyDescriptor->GetName(); - return $PropertyName =~ /^(?:Id|PreviousNo|Type|VM|FileType|Missions)$/ ? "" : + return $PropertyName =~ /^(?:Id|PreviousNo|Type|VM|FileType|Missions|NewWarnings|Warnings|NewTestFailures|FailedTestUnits)$/ ? "" : $PropertyName eq "Started" ? ("ro", "timetipdate") : $self->SUPER::DisplayProperty($PropertyDescriptor); }