Module: tools
Branch: master
Commit: 0d513c4a3f63b4401dc1a2f2924d0e7e43eeae3b
URL: http://source.winehq.org/git/tools.git/?a=commit;h=0d513c4a3f63b4401dc1a2f2…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Tue Sep 4 00:12:38 2012 +0200
testbot/bin: Make sure WineSendLog does not spam anyone by default.
This adds a $WinePatchToOverride configuration option and sets it to
the WineTestBot administrator email address by default. So as the name
implies any test result will be sent to him instead of to the patch
authors until he decides the WineTestBot to be worthy. This also adds
a $WinePatchCc configuration option to set who should be CC-ed the
results. By default this is empty.
---
testbot/bin/WineSendLog.pl | 4 ++--
testbot/lib/WineTestBot/Config.pm | 6 ++++--
testbot/lib/WineTestBot/ConfigLocalTemplate.pl | 11 ++++++++++-
3 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/testbot/bin/WineSendLog.pl b/testbot/bin/WineSendLog.pl
index c4147a6..c8c2dce 100755
--- a/testbot/bin/WineSendLog.pl
+++ b/testbot/bin/WineSendLog.pl
@@ -173,7 +173,7 @@ sub CompareLogs
sub SendLog
{
my $Job = shift;
- my $To = $Job->GetEMailRecipient();
+ my $To = $WinePatchToOverride || $Job->GetEMailRecipient();
if (! defined($To))
{
return;
@@ -420,7 +420,7 @@ EOF
open (SENDMAIL, "|/usr/sbin/sendmail -oi -t -odq");
print SENDMAIL "From: Marvin <$RobotEMail>\n";
print SENDMAIL "To: $To\n";
- print SENDMAIL "Cc: wine-devel\(a)winehq.org\n";
+ print SENDMAIL "Cc: $WinePatchCc\n";
print SENDMAIL "Subject: Re: ", $Job->Patch->Subject, "\n";
print SENDMAIL <<"EOF";
diff --git a/testbot/lib/WineTestBot/Config.pm b/testbot/lib/WineTestBot/Config.pm
index 4299b32..df40a0c 100644
--- a/testbot/lib/WineTestBot/Config.pm
+++ b/testbot/lib/WineTestBot/Config.pm
@@ -28,7 +28,8 @@ use vars qw (@ISA @EXPORT @EXPORT_OK $UseSSL $LogDir $DataDir $BinDir
$VixHostType $VixHostUsername $VixHostPassword
$VixGuestUsername $VixGuestPassword $DbDataSource $DbUsername
$DbPassword $MaxRevertingVMs $MaxRunningVMs $MaxExtraPoweredOnVms $SleepAfterRevert
- $AdminEMail $RobotEMail $SuiteTimeout $SingleTimeout
+ $AdminEMail $RobotEMail $WinePatchToOverride $WinePatchCc
+ $SuiteTimeout $SingleTimeout
$BuildTimeout $ReconfigTimeout $OverheadTimeout $TagPrefix
$ProjectName $PatchesMailingList $PatchResultsEMail $LDAPServer
$LDAPBindDN $LDAPSearchBase $LDAPSearchFilter
@@ -40,7 +41,8 @@ require Exporter;
@EXPORT = qw($UseSSL $LogDir $DataDir $BinDir $VixHostType
$VixHostUsername $VixHostPassword $VixGuestUsername
$VixGuestPassword $MaxRevertingVMs $MaxRunningVMs $MaxExtraPoweredOnVms
- $SleepAfterRevert $AdminEMail $RobotEMail $SuiteTimeout
+ $SleepAfterRevert $AdminEMail $RobotEMail $WinePatchToOverride
+ $WinePatchCc $SuiteTimeout
$SingleTimeout $BuildTimeout $ReconfigTimeout $OverheadTimeout
$TagPrefix $ProjectName $PatchesMailingList $PatchResultsEMail
$LDAPServer $LDAPBindDN $LDAPSearchBase $LDAPSearchFilter
diff --git a/testbot/lib/WineTestBot/ConfigLocalTemplate.pl b/testbot/lib/WineTestBot/ConfigLocalTemplate.pl
index bb7684a..9469784 100644
--- a/testbot/lib/WineTestBot/ConfigLocalTemplate.pl
+++ b/testbot/lib/WineTestBot/ConfigLocalTemplate.pl
@@ -62,8 +62,17 @@ $WineTestBot::Config::AdminEMail = undef;
# From address of mails sent by WineTestBot to users
$WineTestBot::Config::RobotEMail = undef;
+# If set, sends the results to the specified email address instead of the
+# patch author. Set it to undef once your WineTestBot installation works and
+# can provide useful results to Wine developers.
+$WineTestBot::Config::WinePatchToOverride = $WineTestBot::Config::AdminEMail;
+
+# If set, CC the results to the specified email address, for instance the
+# wine-devel mailing list.
+$WineTestBot::Config::WinePatchCc = "";
+
# Email address to send the results to for integration with the Wine Patches
-# site
+# web site
$WineTestBot::Config::PatchResultsEMail = undef;
# Host name of the web interface
Module: tools
Branch: master
Commit: 6043cb66d6ee568983472fdba39bfa14741bfa3c
URL: http://source.winehq.org/git/tools.git/?a=commit;h=6043cb66d6ee568983472fdb…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Tue Sep 4 00:12:30 2012 +0200
testbot/lib: Move the $PatchResultsEMail to ConfigLocalTemplate.pl.
It must be changed for integration with Wine's Patches website and thus should not have to be set in a checked-in file.
---
testbot/lib/WineTestBot/Config.pm | 1 -
testbot/lib/WineTestBot/ConfigLocalTemplate.pl | 4 ++++
2 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/testbot/lib/WineTestBot/Config.pm b/testbot/lib/WineTestBot/Config.pm
index c7b28b1..4299b32 100644
--- a/testbot/lib/WineTestBot/Config.pm
+++ b/testbot/lib/WineTestBot/Config.pm
@@ -65,7 +65,6 @@ $OverheadTimeout = 3 * 60;
$ProjectName = "Wine";
$PatchesMailingList = "wine-patches";
-$PatchResultsEMail = undef;
$LDAPServer = undef;
$LDAPBindDN = undef;
diff --git a/testbot/lib/WineTestBot/ConfigLocalTemplate.pl b/testbot/lib/WineTestBot/ConfigLocalTemplate.pl
index 8ae54f4..bb7684a 100644
--- a/testbot/lib/WineTestBot/ConfigLocalTemplate.pl
+++ b/testbot/lib/WineTestBot/ConfigLocalTemplate.pl
@@ -62,6 +62,10 @@ $WineTestBot::Config::AdminEMail = undef;
# From address of mails sent by WineTestBot to users
$WineTestBot::Config::RobotEMail = undef;
+# Email address to send the results to for integration with the Wine Patches
+# site
+$WineTestBot::Config::PatchResultsEMail = undef;
+
# Host name of the web interface
$WineTestBot::Config::WebHostName = undef;
Module: tools
Branch: master
Commit: 8fd856d8344e257751469c00277fcb1a33a1afea
URL: http://source.winehq.org/git/tools.git/?a=commit;h=8fd856d8344e257751469c00…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Tue Sep 4 00:11:52 2012 +0200
testbot/lib: Add a CombineKey() method for use with GetItem().
This way we don't need to build a dummy object just to be able to compute the string to use for GetItem().
This also provides symmetry with SplitKey().
---
testbot/lib/ObjectModel/Collection.pm | 8 ++++++++
testbot/lib/WineTestBot/PendingPatchSets.pm | 8 +-------
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/testbot/lib/ObjectModel/Collection.pm b/testbot/lib/ObjectModel/Collection.pm
index 9ca2503..3d7f78c 100644
--- a/testbot/lib/ObjectModel/Collection.pm
+++ b/testbot/lib/ObjectModel/Collection.pm
@@ -236,6 +236,14 @@ sub IsEmpty
return scalar(keys %{$self->{Items}}) == 0;
}
+sub CombineKey
+{
+ my $self = shift;
+
+ my $CombinedKey = join("#@#", @_);
+ return $CombinedKey;
+}
+
sub SplitKey
{
my $self = shift;
diff --git a/testbot/lib/WineTestBot/PendingPatchSets.pm b/testbot/lib/WineTestBot/PendingPatchSets.pm
index 998c9d3..1a6b9e5 100644
--- a/testbot/lib/WineTestBot/PendingPatchSets.pm
+++ b/testbot/lib/WineTestBot/PendingPatchSets.pm
@@ -230,13 +230,7 @@ sub NewSubmission
my $PartNo = int($1);
my $MaxPartNo = int($2);
- my $DummySet = CreatePendingPatchSets()->Add();
- $DummySet->EMail($Patch->FromEMail);
- $DummySet->TotalParts($MaxPartNo);
- my $SetKey = $DummySet->GetKey();
- $DummySet = undef;
-
- my $Set = $self->GetItem($SetKey);
+ my $Set = $self->GetItem($self->CombineKey($Patch->FromEMail, $MaxPartNo));
if (! defined($Set))
{
$Set = $self->Add();
Module: tools
Branch: master
Commit: d5fff860f06bf717b92431e919caba05882c7b4d
URL: http://source.winehq.org/git/tools.git/?a=commit;h=d5fff860f06bf717b92431e9…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Tue Sep 4 00:11:16 2012 +0200
testbot/bin: Document the purpose of the scripts.
---
testbot/bin/BuildSingleTest.pl | 4 ++++
testbot/bin/CheckForWinetestUpdate.pl | 4 ++++
testbot/bin/Engine.pl | 18 +++++++++++++++++-
testbot/bin/Janitor.pl | 5 ++---
testbot/bin/PatchNotificationHandler.pl | 3 ++-
testbot/bin/PingEngine.pl | 2 +-
testbot/bin/Reconfig.pl | 4 ++++
testbot/bin/RetrievePatches.pl | 3 +++
testbot/bin/RevertVM.pl | 5 +++++
testbot/bin/WineRunBuild.pl | 3 +++
testbot/bin/WineRunReconfig.pl | 3 +++
testbot/bin/WineRunTask.pl | 2 ++
testbot/bin/WineSendLog.pl | 3 ++-
13 files changed, 52 insertions(+), 7 deletions(-)
diff --git a/testbot/bin/BuildSingleTest.pl b/testbot/bin/BuildSingleTest.pl
index d2b0d99..8018679 100755
--- a/testbot/bin/BuildSingleTest.pl
+++ b/testbot/bin/BuildSingleTest.pl
@@ -1,5 +1,9 @@
#!/usr/bin/perl -Tw
#
+# Performs the 'build' task in the build machine. Specifically this applies a
+# conformance test patch, rebuilds the impacted test and retrieves the
+# resulting 32 and 64 bit binaries.
+#
# Copyright 2009 Ge van Geldorp
#
# This library is free software; you can redistribute it and/or
diff --git a/testbot/bin/CheckForWinetestUpdate.pl b/testbot/bin/CheckForWinetestUpdate.pl
index 7755754..5285d89 100755
--- a/testbot/bin/CheckForWinetestUpdate.pl
+++ b/testbot/bin/CheckForWinetestUpdate.pl
@@ -1,5 +1,9 @@
#!/usr/bin/perl -Tw
#
+# Checks if a new winetest binary is available on http://test.winehq.org/data/.
+# If so, triggers an update of the build VM to the latest Wine source and
+# runs the full test suite on the standard Windows test VMs.
+#
# Copyright 2009 Ge van Geldorp
#
# This library is free software; you can redistribute it and/or
diff --git a/testbot/bin/Engine.pl b/testbot/bin/Engine.pl
index 422e810..947c24c 100755
--- a/testbot/bin/Engine.pl
+++ b/testbot/bin/Engine.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl -Tw
#
-# WineTestBot engine
+# The WineTestBot server, aka the engine that makes it all work.
#
# Copyright 2009 Ge van Geldorp
#
@@ -528,6 +528,22 @@ sub InitVMs()
}
}
+=pod
+=over 12
+
+=item C<SafetyNet()>
+
+This is called on startup and regularly after that to catch thing that fall
+through the cracks, possibly because of an Engine restart.
+Specifically it updates the status of all the current Jobs, Steps and
+Tasks, then schedules Tasks to be run, checks the staging directory for
+wine-patches emails dropped by WinePatchesHandler.pl, for notifications of
+changes on Wine's Patches web site dropped by PatchNotificationHandler.pl, and
+checks whether any pending patchsets are now complete and thus can be scheduled.
+
+=back
+=cut
+
sub SafetyNet
{
my $Jobs = CreateJobs();
diff --git a/testbot/bin/Janitor.pl b/testbot/bin/Janitor.pl
index c4ad4cd..033bd5d 100755
--- a/testbot/bin/Janitor.pl
+++ b/testbot/bin/Janitor.pl
@@ -1,8 +1,7 @@
#!/usr/bin/perl -Tw
#
-# Janitorial tasks
-# Run this from crontab once per day, e.g.
-# 17 1 * * * /usr/lib/winetestbot/bin/Janitor.pl
+# This script performs janitorial tasks. It removes incomplete patch series,
+# archives old jobs and purges older jobs and patches.
#
# Copyright 2009 Ge van Geldorp
#
diff --git a/testbot/bin/PatchNotificationHandler.pl b/testbot/bin/PatchNotificationHandler.pl
index 84ccf87..81cd376 100755
--- a/testbot/bin/PatchNotificationHandler.pl
+++ b/testbot/bin/PatchNotificationHandler.pl
@@ -1,6 +1,7 @@
#!/usr/bin/perl -Tw
#
-# Tell the engine to expect a winetest.exe update on test.winehq.org
+# Notifies WineTestBot that there are new patches to test on
+# http://source.winehq.org/patches.
#
# Copyright 2009 Ge van Geldorp
#
diff --git a/testbot/bin/PingEngine.pl b/testbot/bin/PingEngine.pl
index 6f2581b..4faddf6 100755
--- a/testbot/bin/PingEngine.pl
+++ b/testbot/bin/PingEngine.pl
@@ -1,6 +1,6 @@
#!/usr/bin/perl -Tw
#
-# Ping WineTestBot engine to see if it is alive
+# Pings the WineTestBot engine to see if it is still alive.
#
# Copyright 2009 Ge van Geldorp
#
diff --git a/testbot/bin/Reconfig.pl b/testbot/bin/Reconfig.pl
index c5308f4..aecc6a3 100755
--- a/testbot/bin/Reconfig.pl
+++ b/testbot/bin/Reconfig.pl
@@ -1,5 +1,9 @@
#!/usr/bin/perl -Tw
#
+# Performs the 'reconfig' task in the build machine. Specifically this updates
+# the build machine's Wine repository, re-runs configure, and rebuilds the
+# 32 and 64 bit winetest binaries.
+#
# Copyright 2009 Ge van Geldorp
#
# This library is free software; you can redistribute it and/or
diff --git a/testbot/bin/RetrievePatches.pl b/testbot/bin/RetrievePatches.pl
index c0f17c8..18b3aa7 100755
--- a/testbot/bin/RetrievePatches.pl
+++ b/testbot/bin/RetrievePatches.pl
@@ -1,5 +1,8 @@
#!/usr/bin/perl -Tw
#
+# Retrieve the latest patches from http://source.winehq.org/patches and submit
+# them for testing. See also PatchNotificationHandler.pl.
+#
# Copyright 2009 Ge van Geldorp
#
# This library is free software; you can redistribute it and/or
diff --git a/testbot/bin/RevertVM.pl b/testbot/bin/RevertVM.pl
index 4d7b64f..c62d498 100755
--- a/testbot/bin/RevertVM.pl
+++ b/testbot/bin/RevertVM.pl
@@ -1,5 +1,10 @@
#!/usr/bin/perl -Tw
#
+# Reverts a VM so that it is ready to run jobs. Note that in addition to the
+# hypervisor revert operation this implies letting the VM settle down and
+# checking that it responds to our commands. If this fails the administrator
+# is notified and the VM is marked as offline.
+#
# Copyright 2009 Ge van Geldorp
#
# This library is free software; you can redistribute it and/or
diff --git a/testbot/bin/WineRunBuild.pl b/testbot/bin/WineRunBuild.pl
index d11d4bf..2699351 100755
--- a/testbot/bin/WineRunBuild.pl
+++ b/testbot/bin/WineRunBuild.pl
@@ -1,5 +1,8 @@
#!/usr/bin/perl -Tw
#
+# Communicates with the build machine to have it perform the 'build' task.
+# See the bin/BuildSingleTest.pl script.
+#
# Copyright 2009 Ge van Geldorp
#
# This library is free software; you can redistribute it and/or
diff --git a/testbot/bin/WineRunReconfig.pl b/testbot/bin/WineRunReconfig.pl
index 3a02a9e..4aacd81 100755
--- a/testbot/bin/WineRunReconfig.pl
+++ b/testbot/bin/WineRunReconfig.pl
@@ -1,5 +1,8 @@
#!/usr/bin/perl -Tw
#
+# Communicates with the build machine to have it perform the 'reconfig' task.
+# See the bin/Reconfig.pl script.
+#
# Copyright 2009 Ge van Geldorp
#
# This library is free software; you can redistribute it and/or
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index 71cc9f5..6db920c 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -1,5 +1,7 @@
#!/usr/bin/perl -Tw
#
+# Sends and runs the tasks in the Windows test VMs.
+#
# Copyright 2009 Ge van Geldorp
#
# This library is free software; you can redistribute it and/or
diff --git a/testbot/bin/WineSendLog.pl b/testbot/bin/WineSendLog.pl
index 1f92083..c4147a6 100755
--- a/testbot/bin/WineSendLog.pl
+++ b/testbot/bin/WineSendLog.pl
@@ -1,6 +1,7 @@
#!/usr/bin/perl -Tw
#
-# Send job log to submitting user
+# Sends the job log to the submitting user and informs the Wine Patches web
+# site of the test results.
#
# Copyright 2009 Ge van Geldorp
#