Module: tools Branch: master Commit: bd9e99f5c6e62746aaff7b28a217b2ae03ba727e URL: https://source.winehq.org/git/tools.git/?a=commit;h=bd9e99f5c6e62746aaff7b28...
Author: Francois Gouget fgouget@codeweavers.com Date: Wed Jul 11 11:34:51 2018 +0200
testbot: Remove the Step::InStaging field.
It has been replaced by the new Job-based staging mechanism and is not needed anymore.
Signed-off-by: Francois Gouget fgouget@codeweavers.com Signed-off-by: Alexandre Julliard julliard@winehq.org
---
testbot/bin/CheckForWinetestUpdate.pl | 3 --- testbot/ddl/update38.sql | 4 ++++ testbot/ddl/winetestbot.sql | 1 - testbot/doc/winetestbot-schema.dia | 23 ----------------------- testbot/lib/WineTestBot/Engine/Scheduler.pm | 2 -- testbot/lib/WineTestBot/Patches.pm | 3 --- testbot/lib/WineTestBot/Steps.pm | 29 ----------------------------- testbot/lib/WineTestBot/StepsTasks.pm | 17 +---------------- testbot/web/Submit.pl | 3 --- 9 files changed, 5 insertions(+), 80 deletions(-)
diff --git a/testbot/bin/CheckForWinetestUpdate.pl b/testbot/bin/CheckForWinetestUpdate.pl index a570a1b..df5a326 100755 --- a/testbot/bin/CheckForWinetestUpdate.pl +++ b/testbot/bin/CheckForWinetestUpdate.pl @@ -207,7 +207,6 @@ sub AddJob($$$) $NewStep->Type("suite"); $NewStep->FileName($LatestBaseName); $NewStep->FileType($Bits == 64 ? "exe64" : "exe32"); - $NewStep->InStaging(!1);
# Add a task for each VM my $Tasks = $NewStep->Tasks; @@ -276,7 +275,6 @@ sub AddReconfigJob($) my $BuildStep = $Steps->Add(); $BuildStep->Type("reconfig"); $BuildStep->FileType("none"); - $BuildStep->InStaging(!1);
# And a task for each VM my $SortedKeys = $VMs->SortKeysBySortOrder($VMs->GetKeys()); @@ -309,7 +307,6 @@ sub AddReconfigJob($) $NewStep->PreviousNo($BuildStep->No); $NewStep->Type("suite"); $NewStep->FileType("none"); - $NewStep->InStaging(!1);
foreach my $VMKey (@$SortedKeys) { diff --git a/testbot/ddl/update38.sql b/testbot/ddl/update38.sql new file mode 100644 index 0000000..56f7d11 --- /dev/null +++ b/testbot/ddl/update38.sql @@ -0,0 +1,4 @@ +USE winetestbot; + +ALTER TABLE Steps + DROP InStaging; diff --git a/testbot/ddl/winetestbot.sql b/testbot/ddl/winetestbot.sql index 12b5dea..a6adea8 100644 --- a/testbot/ddl/winetestbot.sql +++ b/testbot/ddl/winetestbot.sql @@ -134,7 +134,6 @@ CREATE TABLE Steps Status ENUM('queued', 'running', 'completed', 'badpatch', 'badbuild', 'boterror', 'canceled', 'skipped') NOT NULL, FileName VARCHAR(100) NULL, FileType ENUM('none', 'exe32', 'exe64', 'patchdlls', 'patchprograms') NOT NULL, - InStaging ENUM('Y', 'N') NOT NULL, DebugLevel INT(2) NOT NULL, ReportSuccessfulTests ENUM('Y', 'N') NOT NULL, PRIMARY KEY (JobId, No), diff --git a/testbot/doc/winetestbot-schema.dia b/testbot/doc/winetestbot-schema.dia index 0dbc7f9..d3efcb8 100644 --- a/testbot/doc/winetestbot-schema.dia +++ b/testbot/doc/winetestbot-schema.dia @@ -1877,29 +1877,6 @@ </dia:composite> <dia:composite type="table_attribute"> <dia:attribute name="name"> - dia:string#InStaging#</dia:string> - </dia:attribute> - <dia:attribute name="type"> - dia:string#BOOL#</dia:string> - </dia:attribute> - <dia:attribute name="comment"> - dia:string##</dia:string> - </dia:attribute> - <dia:attribute name="primary_key"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="nullable"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="unique"> - <dia:boolean val="false"/> - </dia:attribute> - <dia:attribute name="default_value"> - dia:string##</dia:string> - </dia:attribute> - </dia:composite> - <dia:composite type="table_attribute"> - <dia:attribute name="name"> dia:string#DebugLevel#</dia:string> </dia:attribute> <dia:attribute name="type"> diff --git a/testbot/lib/WineTestBot/Engine/Scheduler.pm b/testbot/lib/WineTestBot/Engine/Scheduler.pm index 3ed86e2..4d944c9 100644 --- a/testbot/lib/WineTestBot/Engine/Scheduler.pm +++ b/testbot/lib/WineTestBot/Engine/Scheduler.pm @@ -572,8 +572,6 @@ sub _ScheduleTasks($) my $Previous = ""; # Avoid undefined values for hash indices if (!$Step->PreviousNo) { - # The first step may need to get files from the staging area - $Step->HandleStaging() if ($Step->Status eq "queued"); $StepRank = 0; $StepVMs{$Step} = []; } diff --git a/testbot/lib/WineTestBot/Patches.pm b/testbot/lib/WineTestBot/Patches.pm index cafd54d..2d553fe 100644 --- a/testbot/lib/WineTestBot/Patches.pm +++ b/testbot/lib/WineTestBot/Patches.pm @@ -182,7 +182,6 @@ sub Submit($$$) my $BuildStep = $NewJob->Steps->Add(); $BuildStep->FileName("patch.diff"); $BuildStep->FileType("patchdlls"); - $BuildStep->InStaging(!1); $BuildStep->Type("build"); $BuildStep->DebugLevel(0);
@@ -220,7 +219,6 @@ sub Submit($$$) $FileName .= "64" if ($Bits eq "64"); $NewStep->FileName("$FileName.exe"); $NewStep->FileType("exe$Bits"); - $NewStep->InStaging(!1);
# And a task for each VM my $Tasks = $NewStep->Tasks; @@ -248,7 +246,6 @@ sub Submit($$$) my $NewStep = $NewJob->Steps->Add(); $NewStep->FileName("patch.diff"); $NewStep->FileType("patchdlls"); - $NewStep->InStaging(!1); $NewStep->DebugLevel(0);
# And a task for each VM diff --git a/testbot/lib/WineTestBot/Steps.pm b/testbot/lib/WineTestBot/Steps.pm index 71e0447..9a4ada9 100644 --- a/testbot/lib/WineTestBot/Steps.pm +++ b/testbot/lib/WineTestBot/Steps.pm @@ -90,7 +90,6 @@ sub InitializeNew($$) $self->Status("queued"); $self->Type("single"); $self->FileType("none"); - $self->InStaging(1); $self->DebugLevel(1); $self->ReportSuccessfulTests(!1);
@@ -164,33 +163,6 @@ sub GetFullFileName($) return $Path . $self->FileName; }
-sub HandleStaging($$) -{ - my ($self) = @_; - - # Always at least create the step's directory - my $StepDir = $self->CreateDir(); - return undef if (! $self->InStaging); - - my $FileName = $self->FileName; - if ($FileName !~ m/^[0-9a-z-]+_(.*)$/) - { - return "Can't split staging filename"; - } - my $BaseName = $1; - $self->FileName($BaseName); - my $StagingFileName = "$DataDir/staging/$FileName"; - if (!move($StagingFileName, $self->GetFullFileName())) - { - return "Could not move the staging file: $!"; - } - - $self->InStaging(!1); - my ($ErrProperty, $ErrMessage) = $self->Save(); - - return $ErrMessage; -} - sub UpdateStatus($$) { my ($self, $Skip) = @_; @@ -266,7 +238,6 @@ my @PropertyDescriptors = ( CreateEnumPropertyDescriptor("Type", "Step type", !1, 1, ['suite', 'single', 'build', 'reconfig']), CreateBasicPropertyDescriptor("FileName", "File name", !1, !1, "A", 100), CreateEnumPropertyDescriptor("FileType", "File type", !1, 1, ['none', 'exe32', 'exe64', 'patchdlls', 'patchprograms']), - CreateBasicPropertyDescriptor("InStaging", "File is in staging area", !1, 1, "B", 1), CreateBasicPropertyDescriptor("DebugLevel", "Debug level (WINETEST_DEBUG)", !1, 1, "N", 2), CreateBasicPropertyDescriptor("ReportSuccessfulTests", "Report successful tests (WINETEST_REPORT_SUCCESS)", !1, 1, "B", 1), CreateDetailrefPropertyDescriptor("Tasks", "Tasks", !1, !1, &CreateTasks), diff --git a/testbot/lib/WineTestBot/StepsTasks.pm b/testbot/lib/WineTestBot/StepsTasks.pm index 05854bc..e10cd8c 100644 --- a/testbot/lib/WineTestBot/StepsTasks.pm +++ b/testbot/lib/WineTestBot/StepsTasks.pm @@ -145,22 +145,7 @@ sub _initialize($$) $StepTask->Status($Task->Status); $StepTask->VM($Task->VM); $StepTask->Timeout($Task->Timeout); - if ($Step->InStaging) - { - my $FileName = $Step->FileName; - if ($FileName =~ m/^[\da-fA-F]+ (.*)$/) - { - $StepTask->FileName("$1"); - } - else - { - $StepTask->FileName("unknown"); - } - } - else - { - $StepTask->FileName($Step->FileName); - } + $StepTask->FileName($Step->FileName); $StepTask->FileType($Step->FileType); $StepTask->CmdLineArg($Task->CmdLineArg); $StepTask->Started($Task->Started); diff --git a/testbot/web/Submit.pl b/testbot/web/Submit.pl index cb6a124..e207d78 100644 --- a/testbot/web/Submit.pl +++ b/testbot/web/Submit.pl @@ -801,7 +801,6 @@ sub OnSubmit($) $BuildStep = $Steps->Add(); $BuildStep->FileName($BaseName); $BuildStep->FileType($FileType); - $BuildStep->InStaging(!1); $BuildStep->Type("build"); $BuildStep->DebugLevel(0);
@@ -836,7 +835,6 @@ sub OnSubmit($) { $TestStep->FileName($BaseName); } - $TestStep->InStaging(!1); $TestStep->FileType("exe$Bits"); $TestStep->Type("single"); $TestStep->DebugLevel($self->GetParam("DebugLevel")); @@ -874,7 +872,6 @@ sub OnSubmit($) my $WineStep = $Steps->Add(); $WineStep->FileName($BaseName); $WineStep->FileType($FileType); - $WineStep->InStaging(!1); $WineStep->Type("build"); $WineStep->DebugLevel($self->GetParam("DebugLevel")); $WineStep->ReportSuccessfulTests(defined($self->GetParam("ReportSuccessfulTests")));