We now have read-only access to them. This makes the code more readable.
Signed-off-by: Francois Gouget fgouget@codeweavers.com --- testbot/lib/WineTestBot/Steps.pm | 5 ++--- testbot/lib/WineTestBot/StepsTasks.pm | 6 ++---- testbot/lib/WineTestBot/Tasks.pm | 6 ++---- 3 files changed, 6 insertions(+), 11 deletions(-)
diff --git a/testbot/lib/WineTestBot/Steps.pm b/testbot/lib/WineTestBot/Steps.pm index cd585e9db..48d020949 100644 --- a/testbot/lib/WineTestBot/Steps.pm +++ b/testbot/lib/WineTestBot/Steps.pm @@ -153,9 +153,8 @@ sub GetFullFileName($;$) $FileName = $self->FileName if (!defined $FileName); return undef if (!defined $FileName);
- my ($JobId, $StepNo) = @{$self->GetMasterKey()}; - my $Path = "$DataDir/jobs/$JobId/"; - foreach my $StepNo ($StepNo, $self->PreviousNo) + my $Path = "$DataDir/jobs/". $self->JobId ."/"; + foreach my $StepNo ($self->No, $self->PreviousNo) { next if (!$StepNo); my $Full = "$Path$StepNo/$FileName"; diff --git a/testbot/lib/WineTestBot/StepsTasks.pm b/testbot/lib/WineTestBot/StepsTasks.pm index 0b1655a37..5970c872e 100644 --- a/testbot/lib/WineTestBot/StepsTasks.pm +++ b/testbot/lib/WineTestBot/StepsTasks.pm @@ -37,8 +37,7 @@ use WineTestBot::Missions; sub GetStepDir($) { my ($self) = @_; - my ($JobId, $_StepTaskId) = @{$self->GetMasterKey()}; - return "$DataDir/jobs/$JobId/". $self->StepNo; + return "$DataDir/jobs/". $self->JobId ."/". $self->StepNo; }
# Keep in sync with WineTestBot::Step::GetFullFileName() @@ -49,8 +48,7 @@ sub GetFullFileName($;$) $FileName = $self->FileName if (!defined $FileName); return undef if (!defined $FileName);
- my ($JobId, $_StepTaskId) = @{$self->GetMasterKey()}; - my $Path = "$DataDir/jobs/$JobId/"; + my $Path = "$DataDir/jobs/". $self->JobId ."/"; foreach my $StepNo ($self->StepNo, $self->PreviousNo) { next if (!$StepNo); diff --git a/testbot/lib/WineTestBot/Tasks.pm b/testbot/lib/WineTestBot/Tasks.pm index 8c9f89ce8..a7d9e820e 100644 --- a/testbot/lib/WineTestBot/Tasks.pm +++ b/testbot/lib/WineTestBot/Tasks.pm @@ -139,8 +139,7 @@ sub GetReportNames($) sub GetRefReportName($$) { my ($self, $ReportName) = @_; - my ($JobId, $_StepNo, $_TaskNo) = @{$self->GetMasterKey()}; - return sprintf("%s-job%06d-%s", $self->VM->Name, $JobId, $ReportName); + return sprintf("%s-job%06d-%s", $self->VM->Name, $self->JobId, $ReportName); }
sub GetRefReportPaths($$;$$) @@ -237,13 +236,12 @@ sub Run($$) { my ($self, $Step) = @_;
- my ($JobId, $StepNo, $TaskNo) = @{$self->GetMasterKey()}; my $Script = $Step->Type eq "reconfig" ? "Reconfig" : $self->VM->Type eq "wine" ? "WineTest" : $Step->Type eq "build" ? "Build" : "Task"; my $Args = ["$BinDir/${ProjectName}Run$Script.pl", "--log-only", - $JobId, $StepNo, $TaskNo]; + $self->JobId, $self->StepNo, $self->No];
my $ErrMessage = $self->VM->Run("running", $Args, $self->Timeout + $TimeoutMargin,