[PATCH] testbot: Remove the patchdlls vs. patchprograms distinction.
Francois Gouget
fgouget at codeweavers.com
Thu Jul 12 10:10:47 CDT 2018
A patch could impact tests in both Wine folders. It's up to the build
task to handle whatever the patch contains.
Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---
testbot/bin/WineRunBuild.pl | 2 +-
testbot/bin/WineRunTask.pl | 2 +-
testbot/bin/WineRunWineTest.pl | 2 +-
testbot/ddl/update39.sql | 11 +++++++++++
testbot/ddl/winetestbot.sql | 2 +-
testbot/lib/WineTestBot/Patches.pm | 4 ++--
testbot/lib/WineTestBot/Steps.pm | 2 +-
testbot/web/GetFile.pl | 4 ++--
testbot/web/Submit.pl | 18 +++++++++---------
9 files changed, 29 insertions(+), 18 deletions(-)
create mode 100644 testbot/ddl/update39.sql
diff --git a/testbot/bin/WineRunBuild.pl b/testbot/bin/WineRunBuild.pl
index 90b9f030a..10c098936 100755
--- a/testbot/bin/WineRunBuild.pl
+++ b/testbot/bin/WineRunBuild.pl
@@ -325,7 +325,7 @@ elsif (!$VM->GetDomain()->IsPoweredOn())
FatalError("The VM is not powered on\n");
}
-if ($Step->FileType ne "patchdlls")
+if ($Step->FileType ne "patch")
{
FatalError("Unexpected file type '". $Step->FileType ."' found\n");
}
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index 0f2a093e1..974ff3b51 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -445,7 +445,7 @@ if ($Step->Type eq "single")
# If the user gave us an executable there is no telling
# if it is going going to follow the Wine test standards.
$IsWineTest = (defined $Step->PreviousNo and
- $Job->Steps->GetItem($Step->PreviousNo)->FileType eq "patchdlls");
+ $Job->Steps->GetItem($Step->PreviousNo)->FileType eq "patch");
}
elsif ($Step->Type eq "suite")
{
diff --git a/testbot/bin/WineRunWineTest.pl b/testbot/bin/WineRunWineTest.pl
index 1e43f9a41..e7aa72ec9 100755
--- a/testbot/bin/WineRunWineTest.pl
+++ b/testbot/bin/WineRunWineTest.pl
@@ -383,7 +383,7 @@ elsif (!$VM->GetDomain()->IsPoweredOn())
}
if (($Step->Type eq "suite" and $Step->FileType ne "none") or
- ($Step->Type ne "suite" and $Step->FileType ne "patchdlls"))
+ ($Step->Type ne "suite" and $Step->FileType ne "patch"))
{
FatalError("Unexpected file type '". $Step->FileType ."' found\n");
}
diff --git a/testbot/ddl/update39.sql b/testbot/ddl/update39.sql
new file mode 100644
index 000000000..628e914ce
--- /dev/null
+++ b/testbot/ddl/update39.sql
@@ -0,0 +1,11 @@
+USE winetestbot;
+
+ALTER TABLE Steps
+ MODIFY FileType ENUM('none', 'exe32', 'exe64', 'patchdlls', 'patchprograms', 'patch') NOT NULL;
+
+UPDATE Steps
+ SET FileType = 'patch'
+ WHERE FileType = 'patchdlls' OR FileType = 'patchprograms';
+
+ALTER TABLE Steps
+ MODIFY FileType ENUM('none', 'exe32', 'exe64', 'patch') NOT NULL;
diff --git a/testbot/ddl/winetestbot.sql b/testbot/ddl/winetestbot.sql
index a6adea820..96fcdcb22 100644
--- a/testbot/ddl/winetestbot.sql
+++ b/testbot/ddl/winetestbot.sql
@@ -133,7 +133,7 @@ CREATE TABLE Steps
Type ENUM('suite', 'single', 'build', 'reconfig') NOT NULL,
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,
+ FileType ENUM('none', 'exe32', 'exe64', 'patch') NOT NULL,
DebugLevel INT(2) NOT NULL,
ReportSuccessfulTests ENUM('Y', 'N') NOT NULL,
PRIMARY KEY (JobId, No),
diff --git a/testbot/lib/WineTestBot/Patches.pm b/testbot/lib/WineTestBot/Patches.pm
index 2d553fed3..87f211731 100644
--- a/testbot/lib/WineTestBot/Patches.pm
+++ b/testbot/lib/WineTestBot/Patches.pm
@@ -181,7 +181,7 @@ sub Submit($$$)
# Create the Build Step
my $BuildStep = $NewJob->Steps->Add();
$BuildStep->FileName("patch.diff");
- $BuildStep->FileType("patchdlls");
+ $BuildStep->FileType("patch");
$BuildStep->Type("build");
$BuildStep->DebugLevel(0);
@@ -245,7 +245,7 @@ sub Submit($$$)
# Add a Wine step to the job
my $NewStep = $NewJob->Steps->Add();
$NewStep->FileName("patch.diff");
- $NewStep->FileType("patchdlls");
+ $NewStep->FileType("patch");
$NewStep->DebugLevel(0);
# And a task for each VM
diff --git a/testbot/lib/WineTestBot/Steps.pm b/testbot/lib/WineTestBot/Steps.pm
index cb2c6eeb7..2f5bdb070 100644
--- a/testbot/lib/WineTestBot/Steps.pm
+++ b/testbot/lib/WineTestBot/Steps.pm
@@ -232,7 +232,7 @@ my @PropertyDescriptors = (
CreateEnumPropertyDescriptor("Status", "Status", !1, 1, ['queued', 'running', 'completed', 'badpatch', 'badbuild', 'boterror', 'canceled', 'skipped']),
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']),
+ CreateEnumPropertyDescriptor("FileType", "File type", !1, 1, ['none', 'exe32', 'exe64', 'patch']),
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/web/GetFile.pl b/testbot/web/GetFile.pl
index 1fe140788..a8699497b 100644
--- a/testbot/web/GetFile.pl
+++ b/testbot/web/GetFile.pl
@@ -86,8 +86,8 @@ sub GetFile($$$)
$Request->headers_out->add("Pragma", "no-cache");
# Text or binary file
- my $MIME = $Step->FileType eq "patchdlls" ? "text/plain" :
- "application/octet-stream";
+ my $MIME = $Step->FileType eq "patch" ? "text/plain" :
+ "application/octet-stream";
$Request->content_type($MIME);
$Request->headers_out->add("Content-Disposition",
'attachment; filename="' . $Step->FileName . '"');
diff --git a/testbot/web/Submit.pl b/testbot/web/Submit.pl
index e207d78ba..926fcb7ea 100644
--- a/testbot/web/Submit.pl
+++ b/testbot/web/Submit.pl
@@ -119,7 +119,7 @@ sub GetPropertyDescriptors($)
}
elsif ($self->{Page} == 3)
{
- my $IsPatch = ($self->GetParam("FileType") eq "patchdlls");
+ my $IsPatch = ($self->GetParam("FileType") eq "patch");
$self->{PropertyDescriptors3}[0]->{IsRequired} = $IsPatch;
return $self->{PropertyDescriptors3};
}
@@ -394,7 +394,7 @@ sub DisplayProperty($$)
if ($self->{Page} == 3)
{
my $PropertyName = $PropertyDescriptor->GetName();
- if ($self->GetParam("FileType") eq "patchdlls")
+ if ($self->GetParam("FileType") eq "patch")
{
if ($PropertyName eq "Run64")
{
@@ -482,7 +482,7 @@ sub Validate($)
}
elsif ($self->{Page} == 3 && $self->GetParam("Page") == 3)
{
- if (($self->GetParam("FileType") eq "patchdlls" &&
+ if (($self->GetParam("FileType") eq "patch" &&
$self->GetParam("TestExecutable") !~ m/^[\w_.]+_test\.exe$/) ||
!IsValidFileName($self->GetParam("TestExecutable")))
{
@@ -608,7 +608,7 @@ sub DetermineFileType($$)
else
{
my $TestInfo = (values %{$Impacts->{Tests}})[0];
- $FileType = "patchdlls";
+ $FileType = "patch";
$ExeBase = $TestInfo->{ExeBase};
$TestUnit = (keys %{$TestInfo->{Units}})[0];
}
@@ -656,7 +656,7 @@ sub OnPage1Next($)
$self->{ErrMessage} = $ErrMessage;
return !1;
}
- if ($FileType !~ /^(?:exe32|exe64|patchdlls)$/)
+ if ($FileType !~ /^(?:exe32|exe64|patch)$/)
{
$self->{ErrField} = "File";
$self->{ErrMessage} = "Unrecognized file type";
@@ -781,7 +781,7 @@ sub OnSubmit($)
{
next if ($Bits eq "32" && $FileType eq "exe64");
next if ($Bits eq "64" && $FileType eq "exe32");
- next if ($Bits eq "64" && $FileType eq "patchdlls" && !defined($self->GetParam("Run64")));
+ next if ($Bits eq "64" && $FileType eq "patch" && !defined($self->GetParam("Run64")));
my $Tasks;
my $VMs = CreateVMs();
@@ -795,7 +795,7 @@ sub OnSubmit($)
if (!$Tasks)
{
- if (!$BuildStep and $FileType eq "patchdlls")
+ if (!$BuildStep and $FileType eq "patch")
{
# This is a patch so add a build step...
$BuildStep = $Steps->Add();
@@ -824,7 +824,7 @@ sub OnSubmit($)
# Then create the test step
my $TestStep = $Steps->Add();
- if ($FileType eq "patchdlls")
+ if ($FileType eq "patch")
{
$TestStep->PreviousNo($BuildStep->No);
my $TestExe = basename($self->GetParam("TestExecutable"));
@@ -850,7 +850,7 @@ sub OnSubmit($)
}
}
- if ($FileType eq "patchdlls")
+ if ($FileType eq "patch")
{
my $Tasks;
my $VMs = CreateVMs();
--
2.18.0
More information about the wine-devel
mailing list