Module: tools
Branch: master
Commit: 403fbbff4d62226b0c27eae84c348d51b2560594
URL: http://source.winehq.org/git/tools.git/?a=commit;h=403fbbff4d62226b0c27eae8…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Wed Oct 31 04:47:17 2012 +0100
testbot: Cleanup uses of GetKeys(), GetItem(), GetKey() and CreateCollection().
Specifically:
- Use GetItems() instead of GetKeys() where appropriate. This way the code is simpler and we avoid one call to GetItem() for each iteration.
- Don't call GetKey() when we already have the object's key in a variable.
- Don't store the result of CreateCollection() in a variable if we are only going to use it once.
---
testbot/bin/CheckForWinetestUpdate.pl | 11 +++-----
testbot/bin/Engine.pl | 17 ++++--------
testbot/bin/Janitor.pl | 38 ++++++++------------------
testbot/bin/RevertVM.pl | 3 +-
testbot/bin/WineRunBuild.pl | 10 ++-----
testbot/bin/WineRunReconfig.pl | 4 +--
testbot/bin/WineRunTask.pl | 4 +--
testbot/bin/WineSendLog.pl | 3 +-
testbot/lib/WineTestBot/Branches.pm | 8 +----
testbot/lib/WineTestBot/CGI/Sessions.pm | 6 +---
testbot/lib/WineTestBot/Jobs.pm | 35 +++++++-----------------
testbot/lib/WineTestBot/Patches.pm | 12 +++-----
testbot/lib/WineTestBot/PendingPatchSets.pm | 3 +-
testbot/lib/WineTestBot/StepsTasks.pm | 8 +----
testbot/lib/WineTestBot/Tasks.pm | 4 +--
testbot/lib/WineTestBot/Users.pm | 6 +---
testbot/lib/WineTestBot/VMs.pm | 9 ++----
testbot/web/JobDetails.pl | 5 +--
testbot/web/Submit.pl | 24 ++++++----------
19 files changed, 67 insertions(+), 143 deletions(-)
Diff: http://source.winehq.org/git/tools.git/?a=commitdiff;h=403fbbff4d62226b0c27…
Module: tools
Branch: master
Commit: 1f15aa170d4dc112db076c082c19d39472d86ecd
URL: http://source.winehq.org/git/tools.git/?a=commit;h=1f15aa170d4dc112db076c08…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Wed Oct 31 04:47:05 2012 +0100
testbot/WineRunTask: Just die when killed.
This script had a SIGTERM handler that tried to retrieve the task's
log file. However this caused a deadlock because testagentd is
single-client and WineRunTask still had another connection to it.
Anyway, this last ditch attempt to retrieve the log was questionable
to begin with.
---
testbot/bin/WineRunTask.pl | 9 ---------
1 files changed, 0 insertions(+), 9 deletions(-)
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index edcfd81..aedfed1 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -228,16 +228,7 @@ my $FullLogFileName = "$TaskDir/log";
my $FullErrFileName = "$TaskDir/err";
my $FullScreenshotFileName = "$TaskDir/screenshot.png";
-sub TermHandler
-{
- RetrieveLogFile $Job, $Step, $Task, "C:\\winetest\\$RptFileName",
- $FullLogFileName;
- TakeScreenshot $VM, $FullScreenshotFileName;
- FatalError "Cancelled\n", $FullErrFileName, $Job, $Step, $Task;
-}
-
$VM->Status('running');
-$SIG{TERM} = \&TermHandler;
my ($ErrProperty, $ErrMessage) = $VM->Save();
if (defined($ErrMessage))
{
Module: tools
Branch: master
Commit: 69cb138b894d48156f9a7b1033270feee3fb5a54
URL: http://source.winehq.org/git/tools.git/?a=commit;h=69cb138b894d48156f9a7b10…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Wed Oct 31 04:46:45 2012 +0100
testbot/web: Remove the shebang line and add a copyright notice.
The shebang line is useless for web pages and only causes Apache to generate a warning.
---
testbot/web/GetFile.pl | 18 +++++++++++++++++-
1 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/testbot/web/GetFile.pl b/testbot/web/GetFile.pl
index 1590902..697bbbd 100644
--- a/testbot/web/GetFile.pl
+++ b/testbot/web/GetFile.pl
@@ -1,4 +1,20 @@
-#!/usr/bin/perl -Tw
+# Returns the specified Step/Task file.
+#
+# Copyright 2009 Ge van Geldorp
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
use strict;