Module: tools
Branch: master
Commit: d773793d717dc2cbac0550580ce10b3e6eb1dc76
URL: https://source.winehq.org/git/tools.git/?a=commit;h=d773793d717dc2cbac05505…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Mon Jun 6 05:56:04 2022 +0200
winetest: Apply a couple of spelling fixes.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
winetest/build-patterns | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/winetest/build-patterns b/winetest/build-patterns
index 0bad351..0bab171 100755
--- a/winetest/build-patterns
+++ b/winetest/build-patterns
@@ -1477,7 +1477,7 @@ EOF
<li>Related bugs should have the <i>source</i> and <i>testcase</i> keywords, and their description should contain <i>module</i>:<i>unit</i>, <i>module</i>/<i>unit</i> or <i>module</i>/tests/<i>unit</i>.
</ul>
-<p>The patterns are grouped according to the likelyhood that they contain new failures:</p>
+<p>The patterns are grouped according to the likelihood that they contain new failures:</p>
<ul>";
my @listids = ("summary", "recent", "newmode", "regular", "old",
@@ -1499,7 +1499,7 @@ EOF
$tests{0}->{desc} .= "</ul>";
if (!$nolist)
{
- my @table = ("<details><summary>Page cutomization</summary>
+ my @table = ("<details><summary>Page customization</summary>
<div class='detailsbox'><p>This section lets you select the reports to show on this page.</p><p>
<label><input id='reruns' type='checkbox' checked> Hide WineTest reruns</label><br>");
if (!$subpage or $subpage eq "-tb-win")
Module: tools
Branch: master
Commit: 8c1869ddae04fe3582e46f79cc4e56c3ee600d41
URL: https://source.winehq.org/git/tools.git/?a=commit;h=8c1869ddae04fe3582e46f7…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Mon Jun 6 02:59:28 2022 +0200
testbot: Simplify building a slash-separated Item identifiers.
This also fixes the task id in the GetReportNames() error messages.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/Janitor.pl | 2 +-
testbot/lib/ObjectModel/Item.pm | 19 +++++++++++++++++++
testbot/lib/WineTestBot/Steps.pm | 3 +--
testbot/lib/WineTestBot/Tasks.pm | 13 +++++--------
4 files changed, 26 insertions(+), 11 deletions(-)
diff --git a/testbot/bin/Janitor.pl b/testbot/bin/Janitor.pl
index ab72ac1..af1123a 100755
--- a/testbot/bin/Janitor.pl
+++ b/testbot/bin/Janitor.pl
@@ -205,7 +205,7 @@ if (%DeletedVMs)
{
if (exists $DeletedVMs{$Task->VM->Name})
{
- Trace "Keeping the ", $Task->VM->Name, " VM for task ", join("/", @{$Task->GetMasterKey()}), "\n";
+ Trace "Keeping the ", $Task->VM->Name, " VM for task ", $Task->GetSlashKey(), "\n";
delete $DeletedVMs{$Task->VM->Name};
last if (!%DeletedVMs);
}
diff --git a/testbot/lib/ObjectModel/Item.pm b/testbot/lib/ObjectModel/Item.pm
index 0b1da92..39c80cc 100644
--- a/testbot/lib/ObjectModel/Item.pm
+++ b/testbot/lib/ObjectModel/Item.pm
@@ -350,6 +350,25 @@ sub GetMasterKey($)
return (\@MasterColNames, \@MasterColValues);
}
+=pod
+=over 12
+
+=item C<GetSlashKey()>
+
+Returns a string containing all the slash-separated key components.
+
+This can be used to display the key in the GUI or to build file paths (assuming
+the key components can be trusted).
+
+=back
+=cut
+
+sub GetSlashKey($)
+{
+ my ($self) = @_;
+ return join("/", @{$self->GetMasterKey()}); # drops the column names
+}
+
sub ResetModified($)
{
my ($self) = @_;
diff --git a/testbot/lib/WineTestBot/Steps.pm b/testbot/lib/WineTestBot/Steps.pm
index d2e2831..48d0209 100644
--- a/testbot/lib/WineTestBot/Steps.pm
+++ b/testbot/lib/WineTestBot/Steps.pm
@@ -128,8 +128,7 @@ sub Validate($)
sub GetDir($)
{
my ($self) = @_;
- my ($JobId, $StepNo) = @{$self->GetMasterKey()};
- return "$DataDir/jobs/$JobId/$StepNo";
+ return "$DataDir/jobs/". $self->GetSlashKey();
}
sub CreateDir($)
diff --git a/testbot/lib/WineTestBot/Tasks.pm b/testbot/lib/WineTestBot/Tasks.pm
index c80b432..a7d9e82 100644
--- a/testbot/lib/WineTestBot/Tasks.pm
+++ b/testbot/lib/WineTestBot/Tasks.pm
@@ -91,8 +91,7 @@ sub InitializeNew($$)
sub GetDir($)
{
my ($self) = @_;
- my ($JobId, $StepNo, $TaskNo) = @{$self->GetMasterKey()};
- return "$DataDir/jobs/$JobId/$StepNo/$TaskNo";
+ return "$DataDir/jobs/". $self->GetSlashKey();
}
sub CreateDir($)
@@ -118,13 +117,11 @@ sub GetReportNames($)
return ($ErrMessage, undef, undef) if (defined $ErrMessage);
if (!@$Missions)
{
- my @TaskKey = $self->GetMasterKey();
- return ("Task @TaskKey has no mission", undef, undef);
+ return ("Task ". $self->GetSlashKey() ." has no mission", undef, undef);
}
if (@$Missions > 1)
{
- my @TaskKey = $self->GetMasterKey();
- return ("Task @TaskKey should not have missions for multiple tasks\n", undef);
+ return ("Task ". $self->GetSlashKey() ." should not have missions for multiple tasks\n", undef);
}
my $TaskMissions = $Missions->[0];
@@ -275,7 +272,6 @@ sub UpdateStatus($$)
if ($Status eq "running" and
($VM->Status ne "running" or !$VM->HasRunningChild()))
{
- my ($JobId, $StepNo, $TaskNo) = @{$self->GetMasterKey()};
my $OldUMask = umask(002);
my $TaskDir = $self->CreateDir();
if (open TASKLOG, ">>", "$TaskDir/testbot.log")
@@ -286,7 +282,8 @@ sub UpdateStatus($$)
umask($OldUMask);
require WineTestBot::Log;
- WineTestBot::Log::LogMsg("Child process for task $JobId/$StepNo/$TaskNo died unexpectedly\n");
+ WineTestBot::Log::LogMsg("Child process for task ", $self->GetSlashKey(),
+ " died unexpectedly\n");
# A crash probably indicates a bug in the task script but getting stuck
# could happen due to network issues. So requeue the task like its script