Module: tools
Branch: master
Commit: ae2ecce33aad2f1cefecf5e8fa7ca65cfa6be587
URL: https://source.winehq.org/git/tools.git/?a=commit;h=ae2ecce33aad2f1cefecf5e…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Wed Oct 2 07:00:28 2019 +0200
testbot/LibvirtTool: Check the X session for Wine VMs after booting.
We need to wait for the X session whenever a Wine VM is booted, even
when not creating a snapshot.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/LibvirtTool.pl | 42 +++++++++++++++++++-----------------------
1 file changed, 19 insertions(+), 23 deletions(-)
diff --git a/testbot/bin/LibvirtTool.pl b/testbot/bin/LibvirtTool.pl
index f6e2d4f..5438f29 100755
--- a/testbot/bin/LibvirtTool.pl
+++ b/testbot/bin/LibvirtTool.pl
@@ -420,6 +420,25 @@ sub SetupTestAgentd($$$$)
# A side effect is that it will force TestAgentd.exe.old to stay around.
}
+ if ($Booting and $VM->Type eq "wine")
+ {
+ # Make sure the X session has had time to start
+ Debug(Elapsed($Start), " Waiting for the X session\n");
+ LogMsg "Waiting for the $VMKey X session\n";
+ my $Pid = $TA->Run(["sh", "-c", "while ! xset -display :0.0 q >/dev/null; do sleep 1; done"], 0);
+ FatalError("Could not check for the X session on $VMKey\n") if (!$Pid);
+
+ if (!defined $TA->Wait($Pid, $SleepAfterBoot))
+ {
+ my $ErrMessage = $TA->GetLastError();
+ if ($ErrMessage =~ /timed out waiting for the child process/)
+ {
+ FatalError("Timed out waiting for the X session\n");
+ }
+ FatalError("An error occurred while waiting for the X session: $ErrMessage\n");
+ }
+ }
+
if ($ResetStartCount)
{
# If SetProperty() is not supported neither is --show-restarts.
@@ -443,29 +462,6 @@ sub CreateSnapshot($$)
{
my ($Domain, $SnapshotName) = @_;
- if ($VM->Type eq "wine")
- {
- # Make sure an X session has started before taking the snapshot
- Debug(Elapsed($Start), " Waiting for the X session\n");
- LogMsg "Waiting for the $VMKey X session\n";
- my $TA = $VM->GetAgent();
- my $Pid = $TA->Run(["sh", "-c", "while ! xset -display :0.0 q >/dev/null; do sleep 1; done"], 0);
- if (!$Pid)
- {
- FatalError("Could not check for the X session on the $VMKey VM\n");
- }
- if (!defined $TA->Wait($Pid, $SleepAfterBoot))
- {
- my $ErrMessage = $TA->GetLastError();
- if ($ErrMessage =~ /timed out waiting for the child process/)
- {
- FatalError("Timed out waiting for the X session\n");
- }
- FatalError("An error occurred while waiting for the X session: $ErrMessage\n");
- }
- $TA->Disconnect();
- }
-
if ($SleepAfterBoot != 0)
{
Debug(Elapsed($Start), " Sleeping for the $SnapshotName snapshot\n");
Module: tools
Branch: master
Commit: 0ad777fa1db816a0f74663c94d9fa969218ac859
URL: https://source.winehq.org/git/tools.git/?a=commit;h=0ad777fa1db816a0f74663c…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Wed Oct 2 06:56:23 2019 +0200
testbot/Submit: Add a single page mode.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/web/Submit.pl | 131 ++++++++++++++++++++++++++++++++++++--------------
1 file changed, 95 insertions(+), 36 deletions(-)
diff --git a/testbot/web/Submit.pl b/testbot/web/Submit.pl
index b672375..dc3fdca 100644
--- a/testbot/web/Submit.pl
+++ b/testbot/web/Submit.pl
@@ -325,6 +325,22 @@ sub _ValidateTestExecutable($;$)
return 1;
}
+sub _ValidateUpload($)
+{
+ my ($self) = @_;
+
+ if (defined $self->{FileName})
+ {
+ return undef if (!$self->_ValidateFileName());
+ }
+ else
+ {
+ $self->{FileName} = $self->GetParam("Upload");
+ return undef if (!$self->_ValidateFileName() or !$self->_Upload());
+ }
+ return 1;
+}
+
sub Validate($)
{
my ($self) = @_;
@@ -410,7 +426,7 @@ sub _initialize($$$)
$self->{Page} = $self->GetParam("Page");
# Page is a hidden parameter so fix it instead of issuing an error
- $self->{Page} = 1 if (!defined $self->{Page} or $self->{Page} !~ /^[0-3]$/);
+ $self->{Page} = 1 if (!defined $self->{Page} or $self->{Page} !~ /^[0-4]$/);
$self->{LastPage} = $self->{Page};
# Load the Page 1 parameters
@@ -468,6 +484,9 @@ sub _GenerateStateFields($)
$self->_GenerateStateField("Page");
+ # There are no parameters to preserve when there is a single page
+ return if ($self->{Page} == 4);
+
if ($self->{Page} != 1)
{
$self->_GenerateStateField("Branch");
@@ -514,22 +533,24 @@ sub GetHeaderText($)
{
my ($self) = @_;
+ my @Headers;
if ($self->{Page} == 0)
{
- return "Your job was successfully queued, but the job engine that takes " .
- "care of actually running it seems to be unavailable (perhaps it " .
- "crashed). Your job will remain queued until the engine is " .
- "restarted.";
+ push @Headers,
+ "Your job was successfully queued, but the job engine that takes " .
+ "care of actually running it seems to be unavailable (perhaps it " .
+ "crashed). Your job will remain queued until the engine is " .
+ "restarted.";
}
- elsif ($self->{Page} == 1)
+ if ($self->{Page} == 1 or $self->{Page} == 4)
{
- return defined $self->{FileName} ? "" :
+ push @Headers, defined $self->{FileName} ? "" :
"Specify the patch file that you want to upload and submit " .
"for testing.<br>\n" .
"You can also specify a Windows .exe file, this would normally be " .
"a Wine test executable that you cross-compiled."
}
- elsif ($self->{Page} == 2)
+ if ($self->{Page} == 2 or $self->{Page} == 4)
{
my $HeaderText = "Select the VMs on which you want to run your test.";
my $VMs = CreateVMs();
@@ -538,9 +559,9 @@ sub GetHeaderText($)
{
$HeaderText .= "<br>NOTE: Offline VMs and those undergoing maintenance will not be able to run your tests right away.";
}
- return $HeaderText;
+ push @Headers, $HeaderText;
}
- elsif ($self->{Page} == 3 and $self->{Impacts})
+ if (($self->{Page} == 3 or $self->{Page} == 0) and $self->{Impacts})
{
my @TestExecutables;
$self->_GetTestExecutables();
@@ -562,10 +583,10 @@ sub GetHeaderText($)
}
push @TestExecutables, "$Module: ". join(" ", @TestUnits) if (@TestUnits);
}
- return join("<br>\n", "Here is a list of the test executables impacted by the patch (patched test units, if any, are in italics).", @TestExecutables);
+ push @Headers, join("<br>\n", "Here is a list of the test executables impacted by the patch (patched test units, if any, are in italics).", @TestExecutables);
}
- return "";
+ return join("<br>\n", @Headers);
}
sub GetPropertyDescriptors($)
@@ -581,21 +602,33 @@ sub GetPropertyDescriptors($)
CreateBasicPropertyDescriptor("Remarks", "Remarks", !1, !1, "A", 128),
];
}
- elsif ($self->{Page} == 3)
+ elsif (($self->{Page} == 3 or $self->{Page} == 4) and
+ !$self->{PropertyDescriptors})
{
- if (!$self->{PropertyDescriptors})
+ if ($self->{Page} == 4)
+ {
+ $self->{PropertyDescriptors} = [
+ CreateBasicPropertyDescriptor("Remarks", "Remarks", !1, !1, "A", 128),
+ # Let the user type in the TestExecutable since we won't be able to
+ # figure it out in advance
+ CreateBasicPropertyDescriptor("TestExecutable", "Test executable", !1, 1, "A", 50),
+ ];
+ }
+ else
{
$self->_GetTestExecutables();
my @TestExecutables = sort keys %{$self->{TestExecutables}};
$self->{PropertyDescriptors} = [
CreateEnumPropertyDescriptor("TestExecutable", "Test executable", !1, 1, \@TestExecutables),
- CreateBasicPropertyDescriptor("CmdLineArg", "Command line arguments", !1, !1, "A", 50),
- CreateBasicPropertyDescriptor("Run64", "Run 64-bit tests in addition to 32-bit tests", !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),
];
}
+ push @{$self->{PropertyDescriptors}},
+ CreateBasicPropertyDescriptor("CmdLineArg", "Command line arguments", !1, !1, "A", 50),
+ CreateBasicPropertyDescriptor("Run64", "Run 64-bit tests in addition to 32-bit tests", !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);
}
+
return $self->SUPER::GetPropertyDescriptors();
}
@@ -611,7 +644,7 @@ sub GenerateFields($)
$self->_GenerateStateField("JobKey");
}
- elsif ($self->{Page} == 1)
+ if ($self->{Page} == 1 or $self->{Page} == 4)
{
print "<div class='ItemProperty'><label>File</label>",
"<div class='ItemValue'>";
@@ -657,9 +690,11 @@ sub GenerateFields($)
}
# The other fields are taken care of by FreeFormPage.
$self->{HasRequired} = 1;
+
+ print "<br>\n" if ($self->{Page} == 4);
}
- elsif ($self->{Page} == 2)
+ if ($self->{Page} == 2 or $self->{Page} == 4)
{
$self->_GenerateStateField("ShowAll");
print "<div class='CollectionBlock'><table>\n";
@@ -742,15 +777,23 @@ EOF
print "<input type='submit' name='Action' value='",
$self->{ShowAll} ? "Show base VMs" : "Show all VMs", "'/>\n";
print "</div>\n";
+
+ print "<br>\n" if ($self->{Page} == 4);
}
- elsif ($self->{Page} == 3)
+ if ($self->{Page} == 3 or $self->{Page} == 4)
{
$self->_GenerateStateField("NoCmdLineArgWarn");
# Preserve these fields if they are not shown
- $self->_GenerateStateField("Run64") if (!$self->{ShowRun64} or $self->{FileType} ne "patch");
- $self->_GenerateStateField("TestExecutable") if ($self->{FileType} ne "patch");
+ if (!$self->{ShowRun64} or $self->{FileType} ne "patch")
+ {
+ $self->_GenerateStateField("Run64");
+ }
+ if ($self->{FileType} ne "patch" and $self->{Page} != 4)
+ {
+ $self->_GenerateStateField("TestExecutable");
+ }
# The other fields are taken care of by FreeFormPage.
}
@@ -769,7 +812,7 @@ sub GetActions($)
}
elsif ($self->{Page} == 1)
{
- push @$Actions, "Next >";
+ push @$Actions, "Single Page", "Next >";
}
elsif ($self->{Page} == 2)
{
@@ -779,6 +822,10 @@ sub GetActions($)
{
push @$Actions, "< Prev", "Submit";
}
+ elsif ($self->{Page} == 4)
+ {
+ push @$Actions, "Submit";
+ }
return $Actions;
}
@@ -848,16 +895,8 @@ sub OnPage1Next($)
{
my ($self) = @_;
- if (defined $self->{FileName})
- {
- return undef if (!$self->_ValidateFileName());
- }
- else
- {
- $self->{FileName} = $self->GetParam("Upload");
- return undef if (!$self->_ValidateFileName() or !$self->_Upload());
- }
- if (!$self->Validate() or !$self->_ValidateVMSelection("deselect") or
+ if (!$self->_ValidateUpload() or !$self->Validate() or
+ !$self->_ValidateVMSelection("deselect") or
!$self->_ValidateTestExecutable("reset"))
{
return undef;
@@ -874,6 +913,22 @@ sub OnPage1Next($)
return 1;
}
+sub OnSinglePage($)
+{
+ my ($self) = @_;
+
+ # The checks and defaults are the same as for Page1Next()
+ if (!$self->OnPage1Next())
+ {
+ # But ignore all errors. The user can change everything anyway.
+ delete $self->{ErrField};
+ delete $self->{ErrMessage};
+ }
+
+ $self->_SetPage(4);
+ return 1;
+}
+
sub OnPage2Next($)
{
my ($self) = @_;
@@ -1101,7 +1156,7 @@ sub OnSubmit($)
{
my ($self) = @_;
- return undef if (!$self->Validate());
+ return undef if (!$self->_ValidateUpload() or !$self->Validate());
# Rename the staging file to avoid race conditions if the user clicks on
# Submit multiple times
@@ -1165,7 +1220,11 @@ sub OnAction($$)
{
my ($self, $Action) = @_;
- if ($Action eq "Next >")
+ if ($Action eq "Single Page")
+ {
+ return $self->OnSinglePage();
+ }
+ elsif ($Action eq "Next >")
{
return $self->{Page} == 2 ? $self->OnPage2Next() : $self->OnPage1Next();
}
Module: tools
Branch: master
Commit: cee9428e9c32135ce491b038ee552da999819871
URL: https://source.winehq.org/git/tools.git/?a=commit;h=cee9428e9c32135ce491b03…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Wed Oct 2 06:56:19 2019 +0200
testbot/Submit: Allow submitting patches that touch zero or multiple test units.
Patches submitted through the submit page no longer need to impact one
and only one test unit. This means it's no longer necessary to split
longer patches in order to test them.
With the Wine VMs it also no longer makes sense to ban patches that
don't touch the tests as one may need to make sure they compile and
don't cause regressions in existing tests.
However it is still necessary to specify command line arguments for
the test executable which means picking a single test unit to run.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/WineRunWineTest.pl | 1 +
testbot/bin/build/Build.pl | 6 ++
testbot/bin/build/WineTest.pl | 79 +++++++++++++-----
testbot/lib/Build/Utils.pm | 43 ++++++----
testbot/lib/WineTestBot/PatchUtils.pm | 1 +
testbot/web/Submit.pl | 153 +++++++++++++++++++++++-----------
6 files changed, 199 insertions(+), 84 deletions(-)
Diff: https://source.winehq.org/git/tools.git/?a=commitdiff;h=cee9428e9c32135ce49…
Module: tools
Branch: master
Commit: 8f90991afae2d18da0f10255ce24f7ed8af2a726
URL: https://source.winehq.org/git/tools.git/?a=commit;h=8f90991afae2d18da0f1025…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Wed Oct 2 06:55:32 2019 +0200
testbot/TestAgent: Fix typos in the usage message.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/scripts/TestAgent | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/testbot/scripts/TestAgent b/testbot/scripts/TestAgent
index 84bbf7e..40f443e 100755
--- a/testbot/scripts/TestAgent
+++ b/testbot/scripts/TestAgent
@@ -345,12 +345,12 @@ if (defined $Usage)
print " as <localpath>.\n";
print " run Runs the specified <command> on the server.\n";
print " --run-no-wait Don't wait for the command.\n";
- print " --run-in <serverpath> Redirect the stdin or the command being run to the\n";
+ print " --run-in <serverpath> Redirect the stdin of the command being run to the\n";
print " specified server file.\n";
- print " --run-out <serverpath> Redirect the stdout or the command being run to the\n";
+ print " --run-out <serverpath> Redirect the stdout of the command being run to the\n";
print " specified server file.\n";
print " --run-dntrunc-out Do not truncate the file stdout is redirected to.\n";
- print " --run-err <serverpath> Redirect the stderr or the command being run to the\n";
+ print " --run-err <serverpath> Redirect the stderr of the command being run to the\n";
print " specified server file.\n";
print " --run-dntrunc-err Do not truncate the file stderr is redirected to.\n";
print " wait Waits for the specified child process on the server.\n";