Module: tools
Branch: master
Commit: 540136bbd6898e7b913e39016a088059896f8b20
URL: http://source.winehq.org/git/tools.git/?a=commit;h=540136bbd6898e7b913e3901…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Tue Oct 3 03:26:36 2017 +0200
testbot: Rename DBIBackEnd::PrepareForFork() to Close().
It can also be useful after the fork() and before the exec() so a more
generic name describing what it does is more appropriate.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/bin/Engine.pl | 4 +++-
testbot/lib/ObjectModel/DBIBackEnd.pm | 2 +-
testbot/lib/WineTestBot/Tasks.pm | 4 +++-
testbot/lib/WineTestBot/VMs.pm | 4 +++-
4 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/testbot/bin/Engine.pl b/testbot/bin/Engine.pl
index 6dddc8f..6a05277 100755
--- a/testbot/bin/Engine.pl
+++ b/testbot/bin/Engine.pl
@@ -280,7 +280,9 @@ sub HandleJobStatusChange($$$)
if ($OldStatus eq "running" && $NewStatus ne "running")
{
- $ActiveBackEnds{'WineTestBot'}->PrepareForFork();
+ # Make sure the child process does not inherit the database connection
+ $ActiveBackEnds{'WineTestBot'}->Close();
+
my $Pid = fork;
if (!defined $Pid)
{
diff --git a/testbot/lib/ObjectModel/DBIBackEnd.pm b/testbot/lib/ObjectModel/DBIBackEnd.pm
index d65182d..4082a0a 100644
--- a/testbot/lib/ObjectModel/DBIBackEnd.pm
+++ b/testbot/lib/ObjectModel/DBIBackEnd.pm
@@ -565,7 +565,7 @@ sub DeleteAll($$)
return undef;
}
-sub PrepareForFork($)
+sub Close($)
{
my ($self) = @_;
diff --git a/testbot/lib/WineTestBot/Tasks.pm b/testbot/lib/WineTestBot/Tasks.pm
index 900498a..520d403 100644
--- a/testbot/lib/WineTestBot/Tasks.pm
+++ b/testbot/lib/WineTestBot/Tasks.pm
@@ -99,7 +99,9 @@ sub Run($$)
$RunScript = "RunTask.pl";
}
- $self->GetBackEnd()->PrepareForFork();
+ # Make sure the child process does not inherit the database connection
+ $self->GetBackEnd()->Close();
+
my $Pid = fork;
if (!defined $Pid)
{
diff --git a/testbot/lib/WineTestBot/VMs.pm b/testbot/lib/WineTestBot/VMs.pm
index dafce67..d6bb537 100644
--- a/testbot/lib/WineTestBot/VMs.pm
+++ b/testbot/lib/WineTestBot/VMs.pm
@@ -516,7 +516,9 @@ sub RunRevert($)
my ($ErrProperty, $ErrMessage) = $self->Save();
return $ErrMessage if (defined $ErrMessage);
- $self->GetBackEnd()->PrepareForFork();
+ # Make sure the child process does not inherit the database connection
+ $self->GetBackEnd()->Close();
+
my $Pid = fork;
if (!defined $Pid)
{
Module: tools
Branch: master
Commit: 6b2f134e38bcd8926c95f64ca23c894e74e22e12
URL: http://source.winehq.org/git/tools.git/?a=commit;h=6b2f134e38bcd8926c95f64c…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Tue Oct 3 03:26:23 2017 +0200
testbot: Better document the configuration options.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/WineTestBot/Config.pm | 17 ++++++++++++++++-
testbot/lib/WineTestBot/Jobs.pm | 3 ++-
2 files changed, 18 insertions(+), 2 deletions(-)
diff --git a/testbot/lib/WineTestBot/Config.pm b/testbot/lib/WineTestBot/Config.pm
index 0047770..c5586c7 100644
--- a/testbot/lib/WineTestBot/Config.pm
+++ b/testbot/lib/WineTestBot/Config.pm
@@ -65,18 +65,33 @@ $LogDir = "$::RootDir/var";
$DataDir = "$::RootDir/var";
$BinDir = "$::RootDir/bin";
+# See the ScheduleOnHost() documentation in lib/WineTestBot/Jobs.pm
$MaxRevertingVMs = 1;
$MaxRevertsWhileRunningVMs = 1;
$MaxActiveVMs = 2;
$MaxVMsWhenIdle = undef;
-$SleepAfterRevert = 0;
+
+# How long to wait when connecting to the VM's TestAgent server after a revert
+# (in seconds).
$WaitForToolsInVM = 30;
+# How long to let the VM settle down after the revert before starting a task on
+# it (in seconds).
+$SleepAfterRevert = 0;
+# How many times to run a test that fails before giving up.
$MaxTaskTries = 3;
+# How long to let a test suite run before forcibly shutting it down
+# (in seconds).
$SuiteTimeout = 30 * 60;
+# How long to let a regular test run before forcibly shutting it down
+# (in seconds).
$SingleTimeout = 2 * 60;
+# How long to let a regular build run before forcibly shutting it down
+# (in seconds).
$BuildTimeout = 5 * 60;
+# How long to let a full recompilation run before forcibly shutting it down
+# (in seconds).
$ReconfigTimeout = 45 * 60;
$ProjectName = "Wine";
diff --git a/testbot/lib/WineTestBot/Jobs.pm b/testbot/lib/WineTestBot/Jobs.pm
index 633d9dd..39f9c18 100644
--- a/testbot/lib/WineTestBot/Jobs.pm
+++ b/testbot/lib/WineTestBot/Jobs.pm
@@ -419,7 +419,8 @@ reverting too many VMs at once.
=item *
Once there are no jobs to run anymore the scheduler can prepare up to
-$MaxVMsWhenIdle VMs (or $MaxActiveVMs if not set) for future jobs.
+$MaxVMsWhenIdle VMs (or $MaxActiveVMs if not set) for future jobs. This can be
+set to 0 to minimize the TestBot resource usage when idle.
=cut